Skip to content

Commit 346e3c3

Browse files
author
Morgan
committed
Removed unused variables & color warning message
Random variables that were no longer used were removed and the warning message is now properly passed through the color parser!
1 parent 5d4737b commit 346e3c3

File tree

2 files changed

+4
-14
lines changed

2 files changed

+4
-14
lines changed

src/net/milkbowl/autosave/AutoSave.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,6 @@
3838

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

4342
private AutoSaveThread saveThread = null;
4443
private ReportThread reportThread = null;

src/net/milkbowl/autosave/AutoSaveThread.java

Lines changed: 4 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,6 @@ public class AutoSaveThread extends Thread {
2727

2828
protected final Logger log = Logger.getLogger("Minecraft");
2929
private boolean run = true;
30-
private boolean saveInProgress = false;
3130
private AutoSave plugin = null;
3231
private AutoSaveConfig config = null;
3332

@@ -69,9 +68,7 @@ public void run() {
6968
try {
7069
if (!run) {
7170
if (config.varDebug) {
72-
log.info(String.format(
73-
"[%s] Graceful quit of AutoSaveThread",
74-
plugin.getDescription().getName()));
71+
log.info(String.format("[%s] Graceful quit of AutoSaveThread", plugin.getDescription().getName()));
7572
}
7673
return;
7774
}
@@ -85,16 +82,10 @@ public void run() {
8582
if (warn) {
8683
// Perform warning
8784
if (config.varDebug) {
88-
log.info(String
89-
.format("[%s] Warning Time Reached: %d seconds to go.",
90-
plugin.getDescription().getName(),
91-
config.varInterval - i));
85+
log.info(String.format("[%s] Warning Time Reached: %d seconds to go.", plugin.getDescription().getName(), config.varInterval - i));
9286
}
93-
plugin.getServer().broadcastMessage(
94-
config.messageWarning);
95-
log.info(String.format("[%s] %s", plugin
96-
.getDescription().getName(),
97-
config.messageWarning));
87+
plugin.getServer().broadcastMessage(Generic.parseColor(config.messageWarning));
88+
log.info(String.format("[%s] %s", plugin.getDescription().getName(), config.messageWarning));
9889
}
9990
Thread.sleep(1000);
10091
} catch (InterruptedException e) {

0 commit comments

Comments
 (0)