Formated source code

This commit is contained in:
Boos 2011-12-28 17:36:24 +01:00
parent 746c901825
commit 3f16d593d0
5 changed files with 14 additions and 11 deletions

View File

@ -38,9 +38,11 @@ public class boosConfigManager {
conf.setProperty("commands.options.unit_seconds", "seconds");
conf.setProperty("commands.options.unit_minutes", "minutes");
conf.setProperty("commands.options.unit_hours", "hours");
conf.setProperty("commands.options.message_warmup_cancelled_by_damage",
conf.setProperty(
"commands.options.message_warmup_cancelled_by_damage",
"&6Warm-ups have been cancelled due to receiving damage.&f");
conf.setProperty("commands.options.message_warmup_cancelled_by_move",
conf.setProperty(
"commands.options.message_warmup_cancelled_by_move",
"&6Warm-ups have been cancelled due to moving.&f");
conf.setProperty("commands.options.message_cooldown",
"&6Wait&e &seconds& &unit&&6 before you can use command&e &command& &6again.&f");
@ -82,12 +84,14 @@ public class boosConfigManager {
}
static String getWarmUpCancelledByMoveMessage() {
return conf.getString("commands.options.message_warmup_cancelled_by_move",
return conf.getString(
"commands.options.message_warmup_cancelled_by_move",
"&6Warm-ups have been cancelled due to moving.&f");
}
static String getWarmUpCancelledByDamageMessage() {
return conf.getString("commands.options.message_warmup_cancelled_by_damage",
return conf.getString(
"commands.options.message_warmup_cancelled_by_damage",
"&6Warm-ups have been cancelled due to receiving damage.&f");
}

View File

@ -47,7 +47,8 @@ public class boosCoolDown extends JavaPlugin {
Event.Priority.Normal, this);
}
if (boosConfigManager.getCancelWarmupOnMove()) {
pm.registerEvent(Event.Type.PLAYER_MOVE, playerListener, Event.Priority.Normal, this);
pm.registerEvent(Event.Type.PLAYER_MOVE, playerListener,
Event.Priority.Normal, this);
}
if (boosConfigManager.getClearOnRestart() == true) {
boosCoolDownManager.clear();

View File

@ -25,8 +25,8 @@ public class boosCoolDownEntityListener extends EntityListener {
Player player = (Player) entity;
if (player != null) {
if (boosWarmUpManager.hasWarmUps(player)) {
boosChat.sendMessageToPlayer(player,
boosConfigManager.getWarmUpCancelledByDamageMessage());
boosChat.sendMessageToPlayer(player, boosConfigManager
.getWarmUpCancelledByDamageMessage());
boosWarmUpManager.cancelWarmUps(player);
}

View File

@ -48,8 +48,6 @@ public class boosWarmUpManager {
}
}
public static boolean isWarmUpProcess(Player player, String pre,
String message) {
pre = pre.toLowerCase();

View File

@ -25,7 +25,7 @@ public class boosWarmUpTimer extends TimerTask {
@Override
public void run() {
if (player.isOnline() && boosWarmUpManager.hasWarmUps(player)==true) {
if (player.isOnline() && boosWarmUpManager.hasWarmUps(player) == true) {
boosCoolDownManager.setWarmUpOK(player, pre, message);
boosWarmUpManager.removeWarmUpProcess(this.player.getName() + "@"
+ pre);