Refactoring
This commit is contained in:
@@ -1,5 +1,7 @@
|
||||
package de.anura.core;
|
||||
|
||||
import de.anura.core.API.Core;
|
||||
import de.anura.core.API.Money;
|
||||
import java.sql.ResultSet;
|
||||
import java.sql.SQLException;
|
||||
import java.util.HashMap;
|
||||
@@ -156,17 +158,17 @@ public class FlowerPots {
|
||||
int waitTime = getPotWaitTime(pot);
|
||||
int toWait = (found + waitTime) - current;
|
||||
if (toWait <= 0) return;
|
||||
String text = ChatColor.RED + API.getl("ach_wait_1", P);
|
||||
String text = ChatColor.RED + Core.getl("ach_wait_1", P);
|
||||
if (toWait < 60) {
|
||||
text += " "+ChatColor.GREEN+toWait+" "+ChatColor.RED+API.getl("ach_wait_seconds", P);
|
||||
text += " "+ChatColor.GREEN+toWait+" "+ChatColor.RED+Core.getl("ach_wait_seconds", P);
|
||||
} else if (toWait < 60*60) {
|
||||
text += " "+ChatColor.GREEN+Math.round(toWait/60)+" "+ChatColor.RED+API.getl("ach_wait_minutes", P);
|
||||
text += " "+ChatColor.GREEN+Math.round(toWait/60)+" "+ChatColor.RED+Core.getl("ach_wait_minutes", P);
|
||||
} else if (toWait < 60*60*24) {
|
||||
text += " "+ChatColor.GREEN+Math.round(toWait/60/60)+" "+ChatColor.RED+API.getl("ach_wait_hours", P);
|
||||
text += " "+ChatColor.GREEN+Math.round(toWait/60/60)+" "+ChatColor.RED+Core.getl("ach_wait_hours", P);
|
||||
} else {
|
||||
text += " "+ChatColor.GREEN+Math.round(toWait/60/60/24)+" "+ChatColor.RED+API.getl("ach_wait_days", P);
|
||||
text += " "+ChatColor.GREEN+Math.round(toWait/60/60/24)+" "+ChatColor.RED+Core.getl("ach_wait_days", P);
|
||||
}
|
||||
text += " "+API.getl("ach_wait_2", P);
|
||||
text += " "+Core.getl("ach_wait_2", P);
|
||||
|
||||
P.sendMessage(text);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user