Skip to content

Commit

Permalink
Removed unused variables & color warning message
Browse files Browse the repository at this point in the history
Random variables that were no longer used were removed and the warning
message is now properly passed through the color parser!
  • Loading branch information
Morgan committed Sep 22, 2011
1 parent 5d4737b commit 346e3c3
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 14 deletions.
1 change: 0 additions & 1 deletion src/net/milkbowl/autosave/AutoSave.java
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@

public class AutoSave extends JavaPlugin {
private static final Logger log = Logger.getLogger("Minecraft");
private static final String CONFIG_FILE_NAME = "plugins/AutoSave/config.properties";

private AutoSaveThread saveThread = null;
private ReportThread reportThread = null;
Expand Down
17 changes: 4 additions & 13 deletions src/net/milkbowl/autosave/AutoSaveThread.java
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ public class AutoSaveThread extends Thread {

protected final Logger log = Logger.getLogger("Minecraft");
private boolean run = true;
private boolean saveInProgress = false;
private AutoSave plugin = null;
private AutoSaveConfig config = null;

Expand Down Expand Up @@ -69,9 +68,7 @@ public void run() {
try {
if (!run) {
if (config.varDebug) {
log.info(String.format(
"[%s] Graceful quit of AutoSaveThread",
plugin.getDescription().getName()));
log.info(String.format("[%s] Graceful quit of AutoSaveThread", plugin.getDescription().getName()));
}
return;
}
Expand All @@ -85,16 +82,10 @@ public void run() {
if (warn) {
// Perform warning
if (config.varDebug) {
log.info(String
.format("[%s] Warning Time Reached: %d seconds to go.",
plugin.getDescription().getName(),
config.varInterval - i));
log.info(String.format("[%s] Warning Time Reached: %d seconds to go.", plugin.getDescription().getName(), config.varInterval - i));
}
plugin.getServer().broadcastMessage(
config.messageWarning);
log.info(String.format("[%s] %s", plugin
.getDescription().getName(),
config.messageWarning));
plugin.getServer().broadcastMessage(Generic.parseColor(config.messageWarning));
log.info(String.format("[%s] %s", plugin.getDescription().getName(), config.messageWarning));
}
Thread.sleep(1000);
} catch (InterruptedException e) {
Expand Down

0 comments on commit 346e3c3

Please sign in to comment.