Skip to content

Commit

Permalink
Code cleanup & general improvements
Browse files Browse the repository at this point in the history
- Removed unused portions of the code.
- Now, in theory, the Done message should be printed when the proxy instance is done loading.
  • Loading branch information
BetTD committed Aug 10, 2021
1 parent a7aa46a commit 1c41b37
Showing 1 changed file with 2 additions and 11 deletions.
13 changes: 2 additions & 11 deletions src/main/java/us/sparkedhost/pterobungee/PteroBungee.java
Original file line number Diff line number Diff line change
Expand Up @@ -8,20 +8,13 @@
import java.util.logging.Level;

public final class PteroBungee extends Plugin {

int i = (int) System.currentTimeMillis();

@Override
public void onEnable() {
// Plugin startup logic
getProxy().getPluginManager().registerCommand(this, new StopCommand());
getLogger().log(Level.INFO, "PteroBungee loaded. v" + getProxy().getPluginManager().getPlugin("PteroBungee").getDescription().getVersion() + " developed by SparkedHost");
Runnable doneOutput = new Runnable() {
public void run() {
sendStartedMsg();
}
};
new Thread(doneOutput).start();
Runnable doneOutput = this::sendStartedMsg;
getProxy().getScheduler().runAsync(this, doneOutput);
}

@Override
Expand All @@ -31,8 +24,6 @@ public void onDisable() {
}

public void sendStartedMsg() {
int result = (int) System.currentTimeMillis() - i;
ProxyServer.getInstance().getConsole().sendMessage(new TextComponent("Done (PteroBungee)! For help, type \"help\" or \"?\""));
}

}

0 comments on commit 1c41b37

Please sign in to comment.