better names

This commit is contained in:
Gabriele C 2015-11-24 22:08:06 +01:00
parent e9b2517188
commit a983253384

View File

@ -25,7 +25,7 @@ public class AntiBot {
Bukkit.getScheduler().scheduleSyncDelayedTask(plugin, new Runnable() { Bukkit.getScheduler().scheduleSyncDelayedTask(plugin, new Runnable() {
@Override @Override
public void run() { public void run() {
antiBotStatus = AntiBotStatus.ENABLED; antiBotStatus = AntiBotStatus.LISTENING;
} }
}, 2400); }, 2400);
} }
@ -35,9 +35,9 @@ public class AntiBot {
return; return;
} }
if (activated) { if (activated) {
antiBotStatus = AntiBotStatus.INACTION; antiBotStatus = AntiBotStatus.ACTIVE;
} else { } else {
antiBotStatus = AntiBotStatus.ENABLED; antiBotStatus = AntiBotStatus.LISTENING;
} }
} }
@ -46,7 +46,7 @@ public class AntiBot {
} }
public static void activateAntiBot() { public static void activateAntiBot() {
antiBotStatus = AntiBotStatus.INACTION; antiBotStatus = AntiBotStatus.ACTIVE;
for (String s : messages.send("antibot_auto_enabled")) { for (String s : messages.send("antibot_auto_enabled")) {
Bukkit.broadcastMessage(s); Bukkit.broadcastMessage(s);
} }
@ -54,8 +54,8 @@ public class AntiBot {
Bukkit.getScheduler().scheduleSyncDelayedTask(plugin, new Runnable() { Bukkit.getScheduler().scheduleSyncDelayedTask(plugin, new Runnable() {
@Override @Override
public void run() { public void run() {
if (antiBotStatus == AntiBotStatus.INACTION) { if (antiBotStatus == AntiBotStatus.ACTIVE) {
antiBotStatus = AntiBotStatus.ENABLED; antiBotStatus = AntiBotStatus.LISTENING;
antibotPlayers.clear(); antibotPlayers.clear();
for (String s : messages.send("antibot_auto_disabled")) for (String s : messages.send("antibot_auto_disabled"))
Bukkit.broadcastMessage(s.replace("%m", "" + Settings.antiBotDuration)); Bukkit.broadcastMessage(s.replace("%m", "" + Settings.antiBotDuration));
@ -70,7 +70,7 @@ public class AntiBot {
* @param player Player * @param player Player
*/ */
public static void checkAntiBot(final Player player) { public static void checkAntiBot(final Player player) {
if (antiBotStatus == AntiBotStatus.INACTION || antiBotStatus == AntiBotStatus.DISABLED) { if (antiBotStatus == AntiBotStatus.ACTIVE || antiBotStatus == AntiBotStatus.DISABLED) {
return; return;
} }
if (plugin.getPermissionsManager().hasPermission(player, "authme.bypassantibot")) { if (plugin.getPermissionsManager().hasPermission(player, "authme.bypassantibot")) {
@ -91,9 +91,9 @@ public class AntiBot {
} }
public enum AntiBotStatus { public enum AntiBotStatus {
ENABLED, LISTENING,
DISABLED, DISABLED,
INACTION ACTIVE
} }
} }