From 7e6a2988a60d3264fd59d19382fc6ca0de4aa94a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tim=20D=C3=BCsterhus?= Date: Sat, 13 Aug 2011 18:12:48 +0200 Subject: [PATCH 1/5] Removed unused var, "corrected" if --- .../main/java/bukkit/tommytony/war/War.java | 34 +++++++++---------- 1 file changed, 16 insertions(+), 18 deletions(-) diff --git a/war/src/main/java/bukkit/tommytony/war/War.java b/war/src/main/java/bukkit/tommytony/war/War.java index 09a1086..11ecdd7 100644 --- a/war/src/main/java/bukkit/tommytony/war/War.java +++ b/war/src/main/java/bukkit/tommytony/war/War.java @@ -109,12 +109,12 @@ public class War extends JavaPlugin { this.logger = this.getServer().getLogger(); this.setupPermissions(); - if(!loadedOnce) { + if (!loadedOnce) { loadedOnce = true; // This prevented multiple hookups of the same listener - + // Register hooks PluginManager pm = this.getServer().getPluginManager(); - + pm.registerEvent(Event.Type.PLAYER_QUIT, this.playerListener, Priority.Normal, this); pm.registerEvent(Event.Type.PLAYER_KICK, this.playerListener, Priority.Normal, this); pm.registerEvent(Event.Type.PLAYER_MOVE, this.playerListener, Priority.Normal, this); @@ -123,17 +123,17 @@ public class War extends JavaPlugin { pm.registerEvent(Event.Type.PLAYER_DROP_ITEM, this.playerListener, Priority.Normal, this); pm.registerEvent(Event.Type.PLAYER_COMMAND_PREPROCESS, this.playerListener, Priority.Normal, this); pm.registerEvent(Event.Type.PLAYER_INTERACT, this.playerListener, Priority.Normal, this); - + pm.registerEvent(Event.Type.ENTITY_EXPLODE, this.entityListener, Priority.Normal, this); pm.registerEvent(Event.Type.ENTITY_DAMAGE, this.entityListener, Priority.High, this); pm.registerEvent(Event.Type.ENTITY_COMBUST, this.entityListener, Priority.Normal, this); pm.registerEvent(Event.Type.CREATURE_SPAWN, this.entityListener, Priority.Normal, this); pm.registerEvent(Event.Type.ENTITY_REGAIN_HEALTH, this.entityListener, Priority.Normal, this); - + pm.registerEvent(Event.Type.BLOCK_PLACE, this.blockListener, Priority.Normal, this); pm.registerEvent(Event.Type.BLOCK_BREAK, this.blockListener, Priority.Normal, this); } - + // Load files from disk or create them (using these defaults) this.getDefaultLoadout().put(0, new ItemStack(Material.STONE_SWORD, 1, (byte) 8)); this.getDefaultLoadout().put(1, new ItemStack(Material.BOW, 1, (byte) 8)); @@ -141,7 +141,7 @@ public class War extends JavaPlugin { this.getDefaultLoadout().put(3, new ItemStack(Material.IRON_PICKAXE, 1, (byte) 8)); this.getDefaultLoadout().put(4, new ItemStack(Material.STONE_SPADE, 1, (byte) 8)); this.getDefaultReward().put( 0, new ItemStack(Material.CAKE, 1)); - + WarMapper.load(); this.log("War v" + this.desc.getVersion() + " is on.", Level.INFO); } @@ -154,8 +154,6 @@ public class War extends JavaPlugin { warzone.unload(); } this.warzones.clear(); - - PluginManager pm = this.getServer().getPluginManager(); if (this.warHub != null) { this.warHub.getVolume().resetBlocks(); @@ -280,7 +278,7 @@ public class War extends JavaPlugin { String onOff = namedParams.get("nocreatures"); warzone.setNoCreatures(onOff.equals("on") || onOff.equals("true")); } - + if (namedParams.containsKey("resetonempty")) { String onOff = namedParams.get("resetonempty"); warzone.setResetOnEmpty(onOff.equals("on") || onOff.equals("true")); @@ -374,7 +372,7 @@ public class War extends JavaPlugin { String onOff = namedParams.get("nocreatures"); this.setDefaultNoCreatures(onOff.equals("on") || onOff.equals("true")); } - + if (namedParams.containsKey("resetonempty")) { String onOff = namedParams.get("resetonempty"); this.setDefaultResetOnEmpty(onOff.equals("on") || onOff.equals("true")); @@ -405,10 +403,10 @@ public class War extends JavaPlugin { return false; } } - + public String printConfig(Warzone zone) { return "Warzone " + zone.getName() + " config - " - + "lifepool:" + zone.getLifePool() + " " + + "lifepool:" + zone.getLifePool() + " " + "teamsize:" + zone.getTeamCap() + " " + "maxscore:" + zone.getScoreCap() + " " + "ff:" + onOffStr(zone.getFriendlyFire()) @@ -423,14 +421,14 @@ public class War extends JavaPlugin { + "resetonload:" + onOffStr(zone.isResetOnLoad()) + "resetonunload:" + onOffStr(zone.isResetOnUnload()); } - + public String printConfig() { return "War config - " + "pvpinzonesonly:" + onOffStr(War.war.isPvpInZonesOnly()) + "disablepvpmessage:" + onOffStr(War.war.isDisablePvpMessage()) + "buildinzonesonly:" + onOffStr(War.war.isBuildInZonesOnly()) + "- Warzone defaults - " - + "lifepool:" + War.war.getDefaultLifepool() + " " + + "lifepool:" + War.war.getDefaultLifepool() + " " + "teamsize:" + War.war.getDefaultTeamCap() + " " + "maxscore:" + War.war.getDefaultScoreCap() + " " + "ff:" + onOffStr(War.war.isDefaultFriendlyFire()) @@ -444,14 +442,14 @@ public class War extends JavaPlugin { + "resetonload:" + onOffStr(War.war.isDefaultResetOnLoad()) + "resetonunload:" + onOffStr(War.war.isDefaultResetOnUnload()); } - + private String onOffStr(boolean makeThisAString) { if(makeThisAString) { return "on "; } else { return "off "; } - + } private void setZoneRallyPoint(String warzoneName, Player player) { @@ -512,7 +510,7 @@ public class War extends JavaPlugin { } /** - * Colors the teams and examples in messages + * Colors the teams and examples in messages * * @param String str message-string * @param String msgColor current message-color From f013c209a825f724aea54afc3407311b6ba0229e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tim=20D=C3=BCsterhus?= Date: Sat, 13 Aug 2011 19:29:42 +0200 Subject: [PATCH 2/5] Removed some pieces left from refactor --- .../main/java/bukkit/tommytony/war/War.java | 21 ------------------- .../tommytony/war/WarPlayerListener.java | 4 ++-- 2 files changed, 2 insertions(+), 23 deletions(-) diff --git a/war/src/main/java/bukkit/tommytony/war/War.java b/war/src/main/java/bukkit/tommytony/war/War.java index 11ecdd7..b674226 100644 --- a/war/src/main/java/bukkit/tommytony/war/War.java +++ b/war/src/main/java/bukkit/tommytony/war/War.java @@ -462,27 +462,6 @@ public class War extends JavaPlugin { } } - public boolean inAnyWarzone(Location location) { - Block locBlock = location.getWorld().getBlockAt(location.getBlockX(), location.getBlockY(), location.getBlockZ()); - Warzone currentZone = Warzone.getZoneByLocation(location); - if (currentZone == null) { - return false; - } else if (currentZone.getVolume().isWallBlock(locBlock)) { - return false; // wall block doesnt count. this lets people in at the lobby side wall because wall gates overlap with the zone. - } - return true; - } - - public boolean inWarzone(String warzoneName, Location location) { - Warzone currentZone = Warzone.getZoneByLocation(location); - if (currentZone == null) { - return false; - } else if (warzoneName.toLowerCase().equals(currentZone.getName().toLowerCase())) { - return true; - } - return false; - } - public void addWarzone(Warzone zone) { this.warzones.add(zone); } diff --git a/war/src/main/java/bukkit/tommytony/war/WarPlayerListener.java b/war/src/main/java/bukkit/tommytony/war/WarPlayerListener.java index e882fe1..b8edf30 100644 --- a/war/src/main/java/bukkit/tommytony/war/WarPlayerListener.java +++ b/war/src/main/java/bukkit/tommytony/war/WarPlayerListener.java @@ -179,8 +179,8 @@ public class WarPlayerListener extends PlayerListener { Player player = event.getPlayer(); String reason = event.getReason(); if (reason.contains("moved") || reason.contains("too quickly") || reason.contains("Hacking")) { - boolean inWarzone = War.war.inAnyWarzone(player.getLocation()); - boolean inLobby = War.war.inAnyWarzone(player.getLocation()); + boolean inWarzone = Warzone.getZoneByLocation(player) != null; + boolean inLobby = ZoneLobby.getLobbyByLocation(player) != null; boolean inWarhub = false; if (War.war.getWarHub() != null && War.war.getWarHub().getVolume().contains(player.getLocation())) { inWarhub = true; From ae13d93da1988f8116bbbf3f326876cfb2259289 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tim=20D=C3=BCsterhus?= Date: Sat, 13 Aug 2011 19:30:24 +0200 Subject: [PATCH 3/5] Removed unused import --- war/src/main/java/bukkit/tommytony/war/War.java | 1 - 1 file changed, 1 deletion(-) diff --git a/war/src/main/java/bukkit/tommytony/war/War.java b/war/src/main/java/bukkit/tommytony/war/War.java index b674226..bf96ad5 100644 --- a/war/src/main/java/bukkit/tommytony/war/War.java +++ b/war/src/main/java/bukkit/tommytony/war/War.java @@ -10,7 +10,6 @@ import java.util.logging.Logger; import org.bukkit.ChatColor; import org.bukkit.Location; import org.bukkit.Material; -import org.bukkit.block.Block; import org.bukkit.command.Command; import org.bukkit.command.CommandSender; import org.bukkit.entity.Player; From e9f56967cb486b8e90f6e77d2aa913a55f2d004b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tim=20D=C3=BCsterhus?= Date: Sun, 14 Aug 2011 13:06:35 +0200 Subject: [PATCH 4/5] A switch is more nice here --- .../com/tommytony/war/mappers/WarMapper.java | 23 +++++++++++-------- 1 file changed, 14 insertions(+), 9 deletions(-) diff --git a/war/src/main/java/com/tommytony/war/mappers/WarMapper.java b/war/src/main/java/com/tommytony/war/mappers/WarMapper.java index 2f4e8ce..96c5e03 100644 --- a/war/src/main/java/com/tommytony/war/mappers/WarMapper.java +++ b/war/src/main/java/com/tommytony/war/mappers/WarMapper.java @@ -5,7 +5,6 @@ import java.io.IOException; import java.util.HashMap; import java.util.logging.Level; -import org.bukkit.block.BlockFace; import org.bukkit.inventory.ItemStack; import bukkit.tommytony.war.War; @@ -273,14 +272,20 @@ public class WarMapper { WarHub hub = War.war.getWarHub(); if (hub != null) { String orientationStr = ""; - if (BlockFace.SOUTH == hub.getOrientation()) { - orientationStr = "south"; - } else if (BlockFace.EAST == hub.getOrientation()) { - orientationStr = "east"; - } else if (BlockFace.NORTH == hub.getOrientation()) { - orientationStr = "north"; - } else { - orientationStr = "west"; + switch (hub.getOrientation()) { + case SOUTH: + orientationStr = "south"; + break; + case EAST: + orientationStr = "east"; + break; + case NORTH: + orientationStr = "north"; + break; + case WEST: + default: + orientationStr = "west"; + break; } hubStr = hub.getLocation().getBlockX() + "," + hub.getLocation().getBlockY() + "," + hub.getLocation().getBlockZ() + "," + hub.getLocation().getWorld().getName() + "," + orientationStr; From 174126209b48a201d04de613eaae26503605fa94 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tim=20D=C3=BCsterhus?= Date: Sun, 14 Aug 2011 13:15:55 +0200 Subject: [PATCH 5/5] Forcing the code style we agreed on - Trimming whitespace - Using qualifier whenever possible - Space between if/for/while/switch and ( --- .../main/java/bukkit/tommytony/war/War.java | 154 ++++++++++-------- .../tommytony/war/WarBlockListener.java | 20 ++- .../tommytony/war/WarCommandHandler.java | 41 ++--- .../tommytony/war/WarEntityListener.java | 51 +++--- .../tommytony/war/WarPlayerListener.java | 10 +- .../war/command/AbstractWarCommand.java | 9 +- .../war/command/AbstractZoneMakerCommand.java | 3 +- .../tommytony/war/command/LoadWarCommand.java | 2 +- .../war/command/NotZoneMakerException.java | 2 +- .../war/command/SaveZoneCommand.java | 37 ++--- .../war/command/SetZoneConfigCommand.java | 40 ++--- .../tommytony/war/command/TeamCommand.java | 3 +- .../war/command/WarzonesCommand.java | 5 +- .../main/java/com/tommytony/war/Monument.java | 4 +- war/src/main/java/com/tommytony/war/Team.java | 4 +- .../java/com/tommytony/war/TeamKinds.java | 4 +- .../com/tommytony/war/TeamSpawnStyles.java | 4 +- .../main/java/com/tommytony/war/WarHub.java | 11 +- .../main/java/com/tommytony/war/Warzone.java | 15 +- .../java/com/tommytony/war/ZoneLobby.java | 16 +- .../java/com/tommytony/war/ZoneWallGuard.java | 4 +- .../tommytony/war/jobs/RestoreWarhubJob.java | 2 +- .../mappers/PreDeGaulleZoneVolumeMapper.java | 4 +- .../tommytony/war/mappers/PropertiesFile.java | 52 +++--- .../tommytony/war/mappers/VolumeMapper.java | 4 +- .../com/tommytony/war/mappers/WarMapper.java | 14 +- .../tommytony/war/mappers/WarzoneMapper.java | 4 +- .../war/mappers/ZoneVolumeMapper.java | 69 ++++---- .../com/tommytony/war/utils/ChatFixUtil.java | 18 +- .../war/utils/DeferredBlockReset.java | 2 +- .../com/tommytony/war/volumes/BlockInfo.java | 4 +- .../tommytony/war/volumes/CenteredVolume.java | 6 +- .../tommytony/war/volumes/VerticalVolume.java | 4 +- .../com/tommytony/war/volumes/Volume.java | 4 +- .../com/tommytony/war/volumes/ZoneVolume.java | 4 +- 35 files changed, 337 insertions(+), 293 deletions(-) diff --git a/war/src/main/java/bukkit/tommytony/war/War.java b/war/src/main/java/bukkit/tommytony/war/War.java index bf96ad5..d272213 100644 --- a/war/src/main/java/bukkit/tommytony/war/War.java +++ b/war/src/main/java/bukkit/tommytony/war/War.java @@ -30,9 +30,9 @@ import com.tommytony.war.utils.*; /** * Main class of War - * - * @author tommytony, Tim Düsterhus - * @package bukkit.tommytony.war + * + * @author tommytony, Tim Düsterhus + * @package bukkit.tommytony.war */ public class War extends JavaPlugin { public static PermissionHandler permissionHandler; @@ -74,7 +74,9 @@ public class War extends JavaPlugin { private boolean defaultAutoAssignOnly = false; private boolean defaultUnbreakableZoneBlocks = false; private boolean defaultNoCreatures = false; - private boolean defaultResetOnEmpty = false, defaultResetOnLoad = false, defaultResetOnUnload = false; + private boolean defaultResetOnEmpty = false, + defaultResetOnLoad = false, + defaultResetOnUnload = false; private String defaultSpawnStyle = TeamSpawnStyles.BIG; private final HashMap defaultReward = new HashMap(); @@ -108,8 +110,8 @@ public class War extends JavaPlugin { this.logger = this.getServer().getLogger(); this.setupPermissions(); - if (!loadedOnce) { - loadedOnce = true; // This prevented multiple hookups of the same listener + if (!War.loadedOnce) { + War.loadedOnce = true; // This prevented multiple hookups of the same listener // Register hooks PluginManager pm = this.getServer().getPluginManager(); @@ -139,7 +141,7 @@ public class War extends JavaPlugin { this.getDefaultLoadout().put(2, new ItemStack(Material.ARROW, 7)); this.getDefaultLoadout().put(3, new ItemStack(Material.IRON_PICKAXE, 1, (byte) 8)); this.getDefaultLoadout().put(4, new ItemStack(Material.STONE_SPADE, 1, (byte) 8)); - this.getDefaultReward().put( 0, new ItemStack(Material.CAKE, 1)); + this.getDefaultReward().put(0, new ItemStack(Material.CAKE, 1)); WarMapper.load(); this.log("War v" + this.desc.getVersion() + " is on.", Level.INFO); @@ -185,9 +187,11 @@ public class War extends JavaPlugin { /** * Converts the player-inventory to a loadout hashmap - * - * @param inv inventory to get the items from - * @param loadout the hashmap to save to + * + * @param inv + * inventory to get the items from + * @param loadout + * the hashmap to save to */ private void inventoryToLoadout(PlayerInventory inv, HashMap loadout) { loadout.clear(); @@ -212,9 +216,11 @@ public class War extends JavaPlugin { /** * Converts the player-inventory to a loadout hashmap - * - * @param player player to get the inventory to get the items from - * @param loadout the hashmap to save to + * + * @param player + * player to get the inventory to get the items from + * @param loadout + * the hashmap to save to */ private void inventoryToLoadout(Player player, HashMap loadout) { this.inventoryToLoadout(player.getInventory(), loadout); @@ -385,7 +391,7 @@ public class War extends JavaPlugin { this.setDefaultResetOnUnload(onOff.equals("on") || onOff.equals("true")); } if (commandSender instanceof Player) { - Player player = (Player)commandSender; + Player player = (Player) commandSender; if (namedParams.containsKey("loadout")) { this.inventoryToLoadout(player, this.getDefaultLoadout()); } @@ -405,45 +411,45 @@ public class War extends JavaPlugin { public String printConfig(Warzone zone) { return "Warzone " + zone.getName() + " config - " - + "lifepool:" + zone.getLifePool() + " " - + "teamsize:" + zone.getTeamCap() + " " - + "maxscore:" + zone.getScoreCap() + " " - + "ff:" + onOffStr(zone.getFriendlyFire()) - + "autoassign:" + onOffStr(zone.getAutoAssignOnly()) - + "blockheads:" + onOffStr(zone.isBlockHeads()) - + "spawnstyle:" + zone.getSpawnStyle() + " " - + "monumentheal:" + zone.getMonumentHeal() + " " - + "unbreakable:" + onOffStr(zone.isUnbreakableZoneBlocks()) - + "disabled:" + onOffStr(zone.isDisabled()) - + "nocreatures:" + onOffStr(zone.isNoCreatures()) - + "resetonempty:" + onOffStr(zone.isResetOnEmpty()) - + "resetonload:" + onOffStr(zone.isResetOnLoad()) - + "resetonunload:" + onOffStr(zone.isResetOnUnload()); + + "lifepool:" + zone.getLifePool() + " " + + "teamsize:" + zone.getTeamCap() + " " + + "maxscore:" + zone.getScoreCap() + " " + + "ff:" + this.onOffStr(zone.getFriendlyFire()) + + "autoassign:" + this.onOffStr(zone.getAutoAssignOnly()) + + "blockheads:" + this.onOffStr(zone.isBlockHeads()) + + "spawnstyle:" + zone.getSpawnStyle() + " " + + "monumentheal:" + zone.getMonumentHeal() + " " + + "unbreakable:" + this.onOffStr(zone.isUnbreakableZoneBlocks()) + + "disabled:" + this.onOffStr(zone.isDisabled()) + + "nocreatures:" + this.onOffStr(zone.isNoCreatures()) + + "resetonempty:" + this.onOffStr(zone.isResetOnEmpty()) + + "resetonload:" + this.onOffStr(zone.isResetOnLoad()) + + "resetonunload:" + this.onOffStr(zone.isResetOnUnload()); } public String printConfig() { return "War config - " - + "pvpinzonesonly:" + onOffStr(War.war.isPvpInZonesOnly()) - + "disablepvpmessage:" + onOffStr(War.war.isDisablePvpMessage()) - + "buildinzonesonly:" + onOffStr(War.war.isBuildInZonesOnly()) - + "- Warzone defaults - " - + "lifepool:" + War.war.getDefaultLifepool() + " " - + "teamsize:" + War.war.getDefaultTeamCap() + " " - + "maxscore:" + War.war.getDefaultScoreCap() + " " - + "ff:" + onOffStr(War.war.isDefaultFriendlyFire()) - + "autoassign:" + onOffStr(War.war.isDefaultAutoAssignOnly()) - + "blockheads:" + onOffStr(War.war.isDefaultBlockHeads()) - + "spawnstyle:" + War.war.getDefaultSpawnStyle() + " " - + "monumentheal:" + War.war.getDefaultMonumentHeal() + " " - + "unbreakable:" + onOffStr(War.war.isDefaultUnbreakableZoneBlocks()) - + "nocreatures:" + onOffStr(War.war.isDefaultNoCreatures()) - + "resetonempty:" + onOffStr(War.war.isDefaultResetOnEmpty()) - + "resetonload:" + onOffStr(War.war.isDefaultResetOnLoad()) - + "resetonunload:" + onOffStr(War.war.isDefaultResetOnUnload()); + + "pvpinzonesonly:" + this.onOffStr(War.war.isPvpInZonesOnly()) + + "disablepvpmessage:" + this.onOffStr(War.war.isDisablePvpMessage()) + + "buildinzonesonly:" + this.onOffStr(War.war.isBuildInZonesOnly()) + + "- Warzone defaults - " + + "lifepool:" + War.war.getDefaultLifepool() + " " + + "teamsize:" + War.war.getDefaultTeamCap() + " " + + "maxscore:" + War.war.getDefaultScoreCap() + " " + + "ff:" + this.onOffStr(War.war.isDefaultFriendlyFire()) + + "autoassign:" + this.onOffStr(War.war.isDefaultAutoAssignOnly()) + + "blockheads:" + this.onOffStr(War.war.isDefaultBlockHeads()) + + "spawnstyle:" + War.war.getDefaultSpawnStyle() + " " + + "monumentheal:" + War.war.getDefaultMonumentHeal() + " " + + "unbreakable:" + this.onOffStr(War.war.isDefaultUnbreakableZoneBlocks()) + + "nocreatures:" + this.onOffStr(War.war.isDefaultNoCreatures()) + + "resetonempty:" + this.onOffStr(War.war.isDefaultResetOnEmpty()) + + "resetonload:" + this.onOffStr(War.war.isDefaultResetOnLoad()) + + "resetonunload:" + this.onOffStr(War.war.isDefaultResetOnUnload()); } private String onOffStr(boolean makeThisAString) { - if(makeThisAString) { + if (makeThisAString) { return "on "; } else { return "off "; @@ -470,7 +476,7 @@ public class War extends JavaPlugin { } public void msg(CommandSender sender, String str) { - if(sender instanceof Player) { + if (sender instanceof Player) { String out = ChatColor.GRAY + "War> " + ChatColor.WHITE + this.colorKnownTokens(str, ChatColor.WHITE) + " "; ChatFixUtil.sendMessage(sender, out); } else { @@ -479,7 +485,7 @@ public class War extends JavaPlugin { } public void badMsg(CommandSender sender, String str) { - if(sender instanceof Player) { + if (sender instanceof Player) { String out = ChatColor.GRAY + "War> " + ChatColor.RED + this.colorKnownTokens(str, ChatColor.RED) + " "; ChatFixUtil.sendMessage(sender, out); } else { @@ -489,10 +495,12 @@ public class War extends JavaPlugin { /** * Colors the teams and examples in messages - * - * @param String str message-string - * @param String msgColor current message-color - * @return String Message with colored teams + * + * @param String + * str message-string + * @param String + * msgColor current message-color + * @return String Message with colored teams */ private String colorKnownTokens(String str, ChatColor msgColor) { for (TeamKind kind : TeamKinds.getTeamkinds()) { @@ -504,9 +512,11 @@ public class War extends JavaPlugin { /** * Logs a specified message with a specified level - * - * @param String str message to log - * @param Level lvl level to use + * + * @param String + * str message to log + * @param Level + * lvl level to use */ public void log(String str, Level lvl) { this.getLogger().log(lvl, "War> " + str); @@ -694,7 +704,7 @@ public class War extends JavaPlugin { } public boolean isLoaded() { - return loaded; + return this.loaded; } public void setLoaded(boolean loaded) { @@ -702,7 +712,7 @@ public class War extends JavaPlugin { } public boolean isPvpInZonesOnly() { - return pvpInZonesOnly; + return this.pvpInZonesOnly; } public void setPvpInZonesOnly(boolean pvpInZonesOnly) { @@ -710,7 +720,7 @@ public class War extends JavaPlugin { } public boolean isDisablePvpMessage() { - return disablePvpMessage; + return this.disablePvpMessage; } public void setDisablePvpMessage(boolean disablePvpMessage) { @@ -718,7 +728,7 @@ public class War extends JavaPlugin { } public boolean isBuildInZonesOnly() { - return buildInZonesOnly; + return this.buildInZonesOnly; } public void setBuildInZonesOnly(boolean buildInZonesOnly) { @@ -726,7 +736,7 @@ public class War extends JavaPlugin { } public int getDefaultLifepool() { - return defaultLifepool; + return this.defaultLifepool; } public void setDefaultLifepool(int defaultLifepool) { @@ -734,7 +744,7 @@ public class War extends JavaPlugin { } public int getDefaultTeamCap() { - return defaultTeamCap; + return this.defaultTeamCap; } public void setDefaultTeamCap(int defaultTeamCap) { @@ -742,7 +752,7 @@ public class War extends JavaPlugin { } public int getDefaultScoreCap() { - return defaultScoreCap; + return this.defaultScoreCap; } public void setDefaultScoreCap(int defaultScoreCap) { @@ -750,7 +760,7 @@ public class War extends JavaPlugin { } public int getDefaultMonumentHeal() { - return defaultMonumentHeal; + return this.defaultMonumentHeal; } public void setDefaultMonumentHeal(int defaultMonumentHeal) { @@ -758,7 +768,7 @@ public class War extends JavaPlugin { } public boolean isDefaultBlockHeads() { - return defaultBlockHeads; + return this.defaultBlockHeads; } public void setDefaultBlockHeads(boolean defaultBlockHeads) { @@ -766,7 +776,7 @@ public class War extends JavaPlugin { } public boolean isDefaultFriendlyFire() { - return defaultFriendlyFire; + return this.defaultFriendlyFire; } public void setDefaultFriendlyFire(boolean defaultFriendlyFire) { @@ -774,7 +784,7 @@ public class War extends JavaPlugin { } public boolean isDefaultAutoAssignOnly() { - return defaultAutoAssignOnly; + return this.defaultAutoAssignOnly; } public void setDefaultAutoAssignOnly(boolean defaultAutoAssignOnly) { @@ -782,7 +792,7 @@ public class War extends JavaPlugin { } public boolean isDefaultUnbreakableZoneBlocks() { - return defaultUnbreakableZoneBlocks; + return this.defaultUnbreakableZoneBlocks; } public void setDefaultUnbreakableZoneBlocks(boolean defaultUnbreakableZoneBlocks) { @@ -790,7 +800,7 @@ public class War extends JavaPlugin { } public boolean isDefaultNoCreatures() { - return defaultNoCreatures; + return this.defaultNoCreatures; } public void setDefaultNoCreatures(boolean defaultNoCreatures) { @@ -798,7 +808,7 @@ public class War extends JavaPlugin { } public boolean isDefaultResetOnEmpty() { - return defaultResetOnEmpty; + return this.defaultResetOnEmpty; } public void setDefaultResetOnEmpty(boolean defaultResetOnEmpty) { @@ -806,7 +816,7 @@ public class War extends JavaPlugin { } public boolean isDefaultResetOnLoad() { - return defaultResetOnLoad; + return this.defaultResetOnLoad; } public void setDefaultResetOnLoad(boolean defaultResetOnLoad) { @@ -814,7 +824,7 @@ public class War extends JavaPlugin { } public boolean isDefaultResetOnUnload() { - return defaultResetOnUnload; + return this.defaultResetOnUnload; } public void setDefaultResetOnUnload(boolean defaultResetOnUnload) { @@ -822,7 +832,7 @@ public class War extends JavaPlugin { } public String getDefaultSpawnStyle() { - return defaultSpawnStyle; + return this.defaultSpawnStyle; } public void setDefaultSpawnStyle(String defaultSpawnStyle) { diff --git a/war/src/main/java/bukkit/tommytony/war/WarBlockListener.java b/war/src/main/java/bukkit/tommytony/war/WarBlockListener.java index 2d64e12..0ea2360 100644 --- a/war/src/main/java/bukkit/tommytony/war/WarBlockListener.java +++ b/war/src/main/java/bukkit/tommytony/war/WarBlockListener.java @@ -18,22 +18,26 @@ import com.tommytony.war.Team; import com.tommytony.war.Warzone; /** - * + * * @author tommytony - * + * */ public class WarBlockListener extends BlockListener { /** - * @see BlockListener.onBlockPlace() + * @see BlockListener.onBlockPlace() */ @Override public void onBlockPlace(BlockPlaceEvent event) { - if (!War.war.isLoaded()) return; + if (!War.war.isLoaded()) { + return; + } Player player = event.getPlayer(); Block block = event.getBlock(); - if (player == null || block == null) return; + if (player == null || block == null) { + return; + } Team team = Team.getTeamByPlayerName(player.getName()); Warzone zone = Warzone.getZoneByLocation(player); @@ -110,11 +114,13 @@ public class WarBlockListener extends BlockListener { } /** - * @see BlockListener.onBlockBreak() + * @see BlockListener.onBlockBreak() */ @Override public void onBlockBreak(BlockBreakEvent event) { - if (!War.war.isLoaded()) return; + if (!War.war.isLoaded()) { + return; + } Player player = event.getPlayer(); Block block = event.getBlock(); if (player != null && block != null) { diff --git a/war/src/main/java/bukkit/tommytony/war/WarCommandHandler.java b/war/src/main/java/bukkit/tommytony/war/WarCommandHandler.java index 7c5717e..a6f8159 100644 --- a/war/src/main/java/bukkit/tommytony/war/WarCommandHandler.java +++ b/war/src/main/java/bukkit/tommytony/war/WarCommandHandler.java @@ -9,19 +9,22 @@ import bukkit.tommytony.war.command.*; /** * Handles commands received by War - * - * @author Tim Düsterhus - * @package bukkit.tommytony.war + * + * @author Tim Düsterhus + * @package bukkit.tommytony.war */ public class WarCommandHandler { /** * Handles a command - * - * @param sender The sender of the command - * @param cmd The command - * @param args The arguments - * @return Success + * + * @param sender + * The sender of the command + * @param cmd + * The command + * @param args + * The arguments + * @return Success */ public boolean handle(CommandSender sender, Command cmd, String[] args) { String command = cmd.getName(); @@ -35,12 +38,12 @@ public class WarCommandHandler { } if (arguments.length == 1 && (arguments[0].equals("help") || arguments[0].equals("h"))) { // show /war help - War.war.badMsg(sender, cmd.getUsage()); + War.war.badMsg(sender, cmd.getUsage()); return true; } } else if (command.equals("war") || command.equals("War")) { // show /war help - War.war.msg(sender, cmd.getUsage()); + War.war.msg(sender, cmd.getUsage()); return true; } else { arguments = args; @@ -98,24 +101,22 @@ public class WarCommandHandler { commandObj = new SetWarConfigCommand(this, sender, arguments); } else if (command.equals("zonemaker") || command.equals("zm")) { commandObj = new ZoneMakerCommand(this, sender, arguments); - } + } // we are not responsible for any other command - } - catch (NotZoneMakerException e) { + } catch (NotZoneMakerException e) { War.war.badMsg(sender, "You can't do this if you are not a warzone maker."); - } - catch (Exception e) { + } catch (Exception e) { War.war.log("An error occured while handling command " + cmd.getName() + ". Exception:" + e.getClass().toString() + " " + e.getMessage(), Level.WARNING); e.printStackTrace(); } - - if(commandObj != null) { + + if (commandObj != null) { boolean handled = commandObj.handle(); - if(!handled) { - War.war.badMsg(sender, cmd.getUsage()); + if (!handled) { + War.war.badMsg(sender, cmd.getUsage()); } } - + return true; } } diff --git a/war/src/main/java/bukkit/tommytony/war/WarEntityListener.java b/war/src/main/java/bukkit/tommytony/war/WarEntityListener.java index 43b31ee..171eba6 100644 --- a/war/src/main/java/bukkit/tommytony/war/WarEntityListener.java +++ b/war/src/main/java/bukkit/tommytony/war/WarEntityListener.java @@ -25,16 +25,17 @@ import com.tommytony.war.Warzone; /** * Handles Entity-Events - * - * @author tommytony, Tim Düsterhus - * @package bukkit.tommytony.war + * + * @author tommytony, Tim Düsterhus + * @package bukkit.tommytony.war */ public class WarEntityListener extends EntityListener { /** * Handles PVP-Damage - * - * @param event fired event + * + * @param event + * fired event */ private void handlerAttackDefend(EntityDamageByEntityEvent event) { Entity attacker = event.getDamager(); @@ -132,12 +133,14 @@ public class WarEntityListener extends EntityListener { /** * Protects important structures from explosions - * - * @see EntityListener.onEntityExplode() + * + * @see EntityListener.onEntityExplode() */ @Override public void onEntityExplode(EntityExplodeEvent event) { - if (!War.war.isLoaded()) return; + if (!War.war.isLoaded()) { + return; + } // protect zones elements, lobbies and warhub from creepers List explodedBlocks = event.blockList(); for (Block block : explodedBlocks) { @@ -163,12 +166,14 @@ public class WarEntityListener extends EntityListener { /** * Handles damage on Players - * - * @see EntityListener.onEntityDamage() + * + * @see EntityListener.onEntityDamage() */ @Override public void onEntityDamage(EntityDamageEvent event) { - if (!War.war.isLoaded()) return; + if (!War.war.isLoaded()) { + return; + } Entity entity = event.getEntity(); if (!(entity instanceof Player)) { @@ -201,7 +206,9 @@ public class WarEntityListener extends EntityListener { @Override public void onEntityCombust(EntityCombustEvent event) { - if (!War.war.isLoaded()) return; + if (!War.war.isLoaded()) { + return; + } Entity entity = event.getEntity(); if (entity instanceof Player) { Player player = (Player) entity; @@ -220,12 +227,14 @@ public class WarEntityListener extends EntityListener { /** * Prevents creatures from spawning in warzones if no creatures is active - * - * @see EntityListener.onCreatureSpawn() + * + * @see EntityListener.onCreatureSpawn() */ @Override public void onCreatureSpawn(CreatureSpawnEvent event) { - if (!War.war.isLoaded()) return; + if (!War.war.isLoaded()) { + return; + } Location location = event.getLocation(); Warzone zone = Warzone.getZoneByLocation(location); @@ -237,14 +246,18 @@ public class WarEntityListener extends EntityListener { /** * Prevents health regaining caused by peaceful mode - * - * @see EntityListener.onEntityRegainHealth() + * + * @see EntityListener.onEntityRegainHealth() */ @Override public void onEntityRegainHealth(EntityRegainHealthEvent event) { - if (!War.war.isLoaded() || event.getRegainReason() != RegainReason.REGEN) return; + if (!War.war.isLoaded() || event.getRegainReason() != RegainReason.REGEN) { + return; + } Entity entity = event.getEntity(); - if (!(entity instanceof Player)) return; + if (!(entity instanceof Player)) { + return; + } Player player = (Player) entity; Warzone zone = Warzone.getZoneByLocation(player); diff --git a/war/src/main/java/bukkit/tommytony/war/WarPlayerListener.java b/war/src/main/java/bukkit/tommytony/war/WarPlayerListener.java index b8edf30..0e6154c 100644 --- a/war/src/main/java/bukkit/tommytony/war/WarPlayerListener.java +++ b/war/src/main/java/bukkit/tommytony/war/WarPlayerListener.java @@ -28,15 +28,15 @@ import com.tommytony.war.ZoneLobby; import com.tommytony.war.ZoneSetter; /** - * @author tommytony, Tim Düsterhus - * @package bukkit.tommytony.war + * @author tommytony, Tim Düsterhus + * @package bukkit.tommytony.war */ public class WarPlayerListener extends PlayerListener { private java.util.Random random = new java.util.Random(); /** * Correctly removes quitting players from warzones - * + * * @see PlayerListener.onPlayerQuit() */ @Override @@ -215,7 +215,9 @@ public class WarPlayerListener extends PlayerListener { @Override public void onPlayerMove(PlayerMoveEvent event) { - if (!War.war.isLoaded()) return; + if (!War.war.isLoaded()) { + return; + } Player player = event.getPlayer(); Location playerLoc = event.getFrom(); // same as player.getLoc. Don't call again we need same result. Warzone locZone = Warzone.getZoneByLocation(playerLoc); diff --git a/war/src/main/java/bukkit/tommytony/war/command/AbstractWarCommand.java b/war/src/main/java/bukkit/tommytony/war/command/AbstractWarCommand.java index 0466cb5..9b80b95 100644 --- a/war/src/main/java/bukkit/tommytony/war/command/AbstractWarCommand.java +++ b/war/src/main/java/bukkit/tommytony/war/command/AbstractWarCommand.java @@ -10,6 +10,7 @@ public abstract class AbstractWarCommand { private CommandSender sender; protected String[] args; protected WarCommandHandler handler; + public AbstractWarCommand(WarCommandHandler handler, CommandSender sender, String[] args) { this.handler = handler; this.setSender(sender); @@ -19,11 +20,11 @@ public abstract class AbstractWarCommand { abstract public boolean handle(); public void msg(String message) { - War.war.msg(getSender(), message); + War.war.msg(this.getSender(), message); } - + public void badMsg(String message) { - War.war.badMsg(getSender(), message); + War.war.badMsg(this.getSender(), message); } public void setSender(CommandSender sender) { @@ -31,6 +32,6 @@ public abstract class AbstractWarCommand { } public CommandSender getSender() { - return sender; + return this.sender; } } diff --git a/war/src/main/java/bukkit/tommytony/war/command/AbstractZoneMakerCommand.java b/war/src/main/java/bukkit/tommytony/war/command/AbstractZoneMakerCommand.java index a4aca04..9fc2871 100644 --- a/war/src/main/java/bukkit/tommytony/war/command/AbstractZoneMakerCommand.java +++ b/war/src/main/java/bukkit/tommytony/war/command/AbstractZoneMakerCommand.java @@ -15,8 +15,7 @@ public abstract class AbstractZoneMakerCommand extends AbstractWarCommand { if (!War.war.isZoneMaker((Player) sender)) { throw new NotZoneMakerException(); } - } - else if (!(sender instanceof ConsoleCommandSender)) { + } else if (!(sender instanceof ConsoleCommandSender)) { throw new NotZoneMakerException(); } } diff --git a/war/src/main/java/bukkit/tommytony/war/command/LoadWarCommand.java b/war/src/main/java/bukkit/tommytony/war/command/LoadWarCommand.java index 655bc86..5b4246e 100644 --- a/war/src/main/java/bukkit/tommytony/war/command/LoadWarCommand.java +++ b/war/src/main/java/bukkit/tommytony/war/command/LoadWarCommand.java @@ -15,7 +15,7 @@ public class LoadWarCommand extends AbstractZoneMakerCommand { if (this.args.length != 0) { return false; } - + War.war.loadWar(); this.msg("War loaded."); return true; diff --git a/war/src/main/java/bukkit/tommytony/war/command/NotZoneMakerException.java b/war/src/main/java/bukkit/tommytony/war/command/NotZoneMakerException.java index d93a266..4d05fc1 100644 --- a/war/src/main/java/bukkit/tommytony/war/command/NotZoneMakerException.java +++ b/war/src/main/java/bukkit/tommytony/war/command/NotZoneMakerException.java @@ -3,7 +3,7 @@ package bukkit.tommytony.war.command; public class NotZoneMakerException extends Exception { /** - * + * */ private static final long serialVersionUID = -5412011034665080340L; diff --git a/war/src/main/java/bukkit/tommytony/war/command/SaveZoneCommand.java b/war/src/main/java/bukkit/tommytony/war/command/SaveZoneCommand.java index f4232aa..e418e41 100644 --- a/war/src/main/java/bukkit/tommytony/war/command/SaveZoneCommand.java +++ b/war/src/main/java/bukkit/tommytony/war/command/SaveZoneCommand.java @@ -21,8 +21,8 @@ public class SaveZoneCommand extends AbstractZoneMakerCommand { Warzone zone = null; CommandSender commandSender = this.getSender(); boolean isFirstParamWarzone = false; - - if(this.args.length > 0 && !this.args[0].contains(":")) { + + if (this.args.length > 0 && !this.args[0].contains(":")) { // warzone name maybe in first place Warzone zoneByName = Warzone.getZoneByName(this.args[0]); if (zoneByName != null) { @@ -30,43 +30,43 @@ public class SaveZoneCommand extends AbstractZoneMakerCommand { isFirstParamWarzone = true; } } - + if (this.getSender() instanceof Player) { - Player player = (Player)commandSender; - + Player player = (Player) commandSender; + Warzone zoneByLoc = Warzone.getZoneByLocation(player); ZoneLobby lobbyByLoc = ZoneLobby.getLobbyByLocation(player); - if(zoneByLoc == null && lobbyByLoc != null) { + if (zoneByLoc == null && lobbyByLoc != null) { zoneByLoc = lobbyByLoc.getZone(); } - if(zoneByLoc != null) { + if (zoneByLoc != null) { zone = zoneByLoc; - } + } } - + if (zone == null) { // No warzone found, whatever the mean, escape return false; } - + if (isFirstParamWarzone) { - if(this.args.length > 1) { + if (this.args.length > 1) { // More than one param: the arguments need to be shifted String[] newargs = new String[this.args.length - 1]; for (int i = 1; i < this.args.length; i++) { - newargs[i-1] = args[i]; + newargs[i - 1] = this.args[i]; } - this.args = newargs; + this.args = newargs; } } - + // We have a warzone and indexed-from-0 arguments, let's updatethis.msg(player, "Saving warzone " + warzone.getName() + "."); int savedBlocks = zone.saveState(true); - + // changed settings: must reinitialize with new settings - War.war.updateZoneFromNamedParams(zone, commandSender, args); + War.war.updateZoneFromNamedParams(zone, commandSender, this.args); WarzoneMapper.save(zone, true); - if(this.args.length > 0) { + if (this.args.length > 0) { // the config may have changed, requiring a reset for spawn styles etc. zone.getVolume().resetBlocks(); } @@ -80,9 +80,8 @@ public class SaveZoneCommand extends AbstractZoneMakerCommand { War.war.getWarHub().initialize(); } - this.msg("Warzone " + zone.getName() + " initial state changed. Saved " + savedBlocks + " blocks."); - + return true; } } diff --git a/war/src/main/java/bukkit/tommytony/war/command/SetZoneConfigCommand.java b/war/src/main/java/bukkit/tommytony/war/command/SetZoneConfigCommand.java index ee8ce06..e3dfc64 100644 --- a/war/src/main/java/bukkit/tommytony/war/command/SetZoneConfigCommand.java +++ b/war/src/main/java/bukkit/tommytony/war/command/SetZoneConfigCommand.java @@ -23,7 +23,7 @@ public class SetZoneConfigCommand extends AbstractZoneMakerCommand { CommandSender commandSender = this.getSender(); boolean isFirstParamWarzone = false; boolean wantsToPrint = false; - + if (this.args.length == 0) { return false; } else { @@ -33,59 +33,59 @@ public class SetZoneConfigCommand extends AbstractZoneMakerCommand { if (zoneByName != null) { zone = zoneByName; isFirstParamWarzone = true; - } else if (this.args[0].equals("-p") || this.args[0].equals("print")){ + } else if (this.args[0].equals("-p") || this.args[0].equals("print")) { wantsToPrint = true; } } - + if (this.getSender() instanceof Player) { - player = (Player)commandSender; - + player = (Player) commandSender; + Warzone zoneByLoc = Warzone.getZoneByLocation(player); ZoneLobby lobbyByLoc = ZoneLobby.getLobbyByLocation(player); - if(zoneByLoc == null && lobbyByLoc != null) { + if (zoneByLoc == null && lobbyByLoc != null) { zoneByLoc = lobbyByLoc.getZone(); } - if(zoneByLoc != null) { + if (zoneByLoc != null) { zone = zoneByLoc; - } + } } - + if (zone == null) { // No warzone found, whatever the mean, escape return false; } - + if (isFirstParamWarzone) { - if(this.args.length == 1) { + if (this.args.length == 1) { // Only one param: the warzone name - default to usage return false; } // More than one param: the arguments need to be shifted String[] newargs = new String[this.args.length - 1]; for (int i = 1; i < this.args.length; i++) { - newargs[i-1] = args[i]; + newargs[i - 1] = this.args[i]; } this.args = newargs; } - + // args have been shifted if needed - if(this.args.length > 0 && (this.args[0].equals("-p") || this.args[0].equals("print"))) { + if (this.args.length > 0 && (this.args[0].equals("-p") || this.args[0].equals("print"))) { // only printing - if(this.args.length == 1) { + if (this.args.length == 1) { this.msg(War.war.printConfig(zone)); return true; } else { // first param was to print, shift again String[] newargs = new String[this.args.length - 1]; for (int i = 1; i < this.args.length; i++) { - newargs[i-1] = args[i]; + newargs[i - 1] = this.args[i]; } this.args = newargs; } wantsToPrint = true; - } - + } + // We have a warzone and indexed-from-0 arguments, let's update if (War.war.updateZoneFromNamedParams(zone, player, this.args)) { this.msg("Saving config and resetting warzone " + zone.getName() + "."); @@ -95,7 +95,7 @@ public class SetZoneConfigCommand extends AbstractZoneMakerCommand { zone.getLobby().getVolume().resetBlocks(); } zone.initializeZone(); // bring back team spawns etc - + if (wantsToPrint) { this.msg("Warzone config saved. Zone reset. " + War.war.printConfig(zone)); } else { @@ -109,7 +109,7 @@ public class SetZoneConfigCommand extends AbstractZoneMakerCommand { } else { this.badMsg("Failed to read named parameters."); } - + return true; } } diff --git a/war/src/main/java/bukkit/tommytony/war/command/TeamCommand.java b/war/src/main/java/bukkit/tommytony/war/command/TeamCommand.java index f5e2b4e..1d500cc 100644 --- a/war/src/main/java/bukkit/tommytony/war/command/TeamCommand.java +++ b/war/src/main/java/bukkit/tommytony/war/command/TeamCommand.java @@ -10,8 +10,9 @@ import com.tommytony.war.Team; /** * Sends a message to all team-members + * * @author das-schaf - * + * */ public class TeamCommand extends AbstractWarCommand { public TeamCommand(WarCommandHandler handler, CommandSender sender, String[] args) { diff --git a/war/src/main/java/bukkit/tommytony/war/command/WarzonesCommand.java b/war/src/main/java/bukkit/tommytony/war/command/WarzonesCommand.java index be75ea7..c72b7f5 100644 --- a/war/src/main/java/bukkit/tommytony/war/command/WarzonesCommand.java +++ b/war/src/main/java/bukkit/tommytony/war/command/WarzonesCommand.java @@ -11,7 +11,7 @@ import com.tommytony.war.Warzone; /** * Lists all warzones - * + * * @author Tim Düsterhus */ public class WarzonesCommand extends AbstractWarCommand { @@ -27,8 +27,7 @@ public class WarzonesCommand extends AbstractWarCommand { String warzonesMessage = "Warzones: "; if (War.war.getWarzones().isEmpty()) { warzonesMessage += "none."; - } - else { + } else { for (Warzone warzone : War.war.getWarzones()) { warzonesMessage += warzone.getName() + " (" + warzone.getTeams().size() + " teams, "; int playerTotal = 0; diff --git a/war/src/main/java/com/tommytony/war/Monument.java b/war/src/main/java/com/tommytony/war/Monument.java index 25a29b2..5f491d3 100644 --- a/war/src/main/java/com/tommytony/war/Monument.java +++ b/war/src/main/java/com/tommytony/war/Monument.java @@ -8,9 +8,9 @@ import org.bukkit.block.BlockFace; import com.tommytony.war.volumes.Volume; /** - * + * * @author tommytony - * + * */ public class Monument { private Location location; diff --git a/war/src/main/java/com/tommytony/war/Team.java b/war/src/main/java/com/tommytony/war/Team.java index 349bd7d..84a0d0f 100644 --- a/war/src/main/java/com/tommytony/war/Team.java +++ b/war/src/main/java/com/tommytony/war/Team.java @@ -15,9 +15,9 @@ import com.tommytony.war.utils.SignHelper; import com.tommytony.war.volumes.Volume; /** - * + * * @author tommytony - * + * */ public class Team { private List players = new ArrayList(); diff --git a/war/src/main/java/com/tommytony/war/TeamKinds.java b/war/src/main/java/com/tommytony/war/TeamKinds.java index 53ff22d..c18bb9d 100644 --- a/war/src/main/java/com/tommytony/war/TeamKinds.java +++ b/war/src/main/java/com/tommytony/war/TeamKinds.java @@ -7,9 +7,9 @@ import org.bukkit.ChatColor; import org.bukkit.Material; /** - * + * * @author tommytony - * + * */ public class TeamKinds { private static final List teamKinds = new ArrayList(); diff --git a/war/src/main/java/com/tommytony/war/TeamSpawnStyles.java b/war/src/main/java/com/tommytony/war/TeamSpawnStyles.java index a7d829c..ff68c55 100644 --- a/war/src/main/java/com/tommytony/war/TeamSpawnStyles.java +++ b/war/src/main/java/com/tommytony/war/TeamSpawnStyles.java @@ -1,9 +1,9 @@ package com.tommytony.war; /** - * + * * @author tommytony - * + * */ public class TeamSpawnStyles { public static final String INVISIBLE = "invisible"; diff --git a/war/src/main/java/com/tommytony/war/WarHub.java b/war/src/main/java/com/tommytony/war/WarHub.java index e33affe..f461b3f 100644 --- a/war/src/main/java/com/tommytony/war/WarHub.java +++ b/war/src/main/java/com/tommytony/war/WarHub.java @@ -15,9 +15,9 @@ import com.tommytony.war.volumes.BlockInfo; import com.tommytony.war.volumes.Volume; /** - * - * @author tommytony, Tim Düsterhus - * @package com.tommytony.war + * + * @author tommytony, Tim Düsterhus + * @package com.tommytony.war */ public class WarHub { private Location location; @@ -192,8 +192,9 @@ public class WarHub { /** * Resets the sign of the given warzone - * - * @param Warzone zone + * + * @param Warzone + * zone */ public void resetZoneSign(Warzone zone) { BlockFace left; diff --git a/war/src/main/java/com/tommytony/war/Warzone.java b/war/src/main/java/com/tommytony/war/Warzone.java index ef53af0..e2d642e 100644 --- a/war/src/main/java/com/tommytony/war/Warzone.java +++ b/war/src/main/java/com/tommytony/war/Warzone.java @@ -26,9 +26,9 @@ import com.tommytony.war.utils.InventoryStash; import com.tommytony.war.volumes.ZoneVolume; /** - * - * @author tommytony - * @package com.tommytony.war + * + * @author tommytony + * @package com.tommytony.war */ public class Warzone { private String name; @@ -91,7 +91,7 @@ public class Warzone { // perfect match, return right away return warzone; } else if (warzone.getName().toLowerCase().startsWith(name.toLowerCase())) { - // prehaps there's a perfect match in the remaining zones, let's take this one aside + // prehaps there's a perfect match in the remaining zones, let's take this one aside bestGuess = warzone; } } @@ -147,8 +147,7 @@ public class Warzone { String teamsMessage = "Teams: "; if (this.getTeams().isEmpty()) { teamsMessage += "none."; - } - else { + } else { for (Team team : this.getTeams()) { teamsMessage += team.getName() + " (" + team.getPoints() + " points, " + team.getRemainingLifes() + "/" + this.getLifePool() + " lives left. "; for (Player member : team.getPlayers()) { @@ -208,7 +207,7 @@ public class Warzone { /** * Goes back to the saved state of the warzone (resets only block types, not physics). Also teleports all players back to their respective spawns. - * + * * @return */ public void initializeZone() { @@ -950,7 +949,7 @@ public class Warzone { public void setSpawnStyle(String spawnStyle) { this.spawnStyle = spawnStyle; - for(Team team : this.teams) { + for (Team team : this.teams) { team.setTeamSpawn(team.getTeamSpawn()); } } diff --git a/war/src/main/java/com/tommytony/war/ZoneLobby.java b/war/src/main/java/com/tommytony/war/ZoneLobby.java index 3fe8e84..472f777 100644 --- a/war/src/main/java/com/tommytony/war/ZoneLobby.java +++ b/war/src/main/java/com/tommytony/war/ZoneLobby.java @@ -18,9 +18,9 @@ import com.tommytony.war.volumes.Volume; import com.tommytony.war.volumes.ZoneVolume; /** - * + * * @author tommytony - * + * */ public class ZoneLobby { private final Warzone warzone; @@ -41,7 +41,7 @@ public class ZoneLobby { /** * Use this constructor with /setzonelobby - * + * * @param war * @param warzone * @param wall @@ -59,7 +59,7 @@ public class ZoneLobby { /** * Use this constructor with /setzonelobby . Makes sure the lobby is not sticking inside the zone. - * + * * @param war * @param warzone * @param wall @@ -115,7 +115,7 @@ public class ZoneLobby { /** * Changes the lobby's position. Orientation is determined from the player location. Creates volume or resets. Saves new lobby blocks. - * + * * @param playerLocation */ public void setLocation(Location playerLocation) { @@ -174,7 +174,7 @@ public class ZoneLobby { /** * Classic way of creating a lobby. Lobby position goes to middle of zone wall. Creates volume or resets. Saves new lobby blocks. - * + * * @param newWall */ public void setWall(BlockFace newWall) { @@ -243,7 +243,7 @@ public class ZoneLobby { private void calculateLobbyWidth() { int noOfTeams = this.warzone.getTeams().size(); - if(this.warzone.isAutoAssignOnly()) { + if (this.warzone.isAutoAssignOnly()) { noOfTeams = 1; } int lobbyWidth = noOfTeams * 4 + 5; @@ -477,7 +477,7 @@ public class ZoneLobby { Block autoAssignGateBlock = BlockInfo.getBlock(this.warzone.getWorld(), this.autoAssignGate); this.setBlock(autoAssignGateBlock.getFace(BlockFace.DOWN), (Material.GLOWSTONE)); int size = teams.size(); - if(size > 0) { + if (size > 0) { TeamKind[] doorBlockKinds = new TeamKind[7]; for (int i = 0; i < 7; i++) { doorBlockKinds[i] = teams.get(i % size).getKind(); diff --git a/war/src/main/java/com/tommytony/war/ZoneWallGuard.java b/war/src/main/java/com/tommytony/war/ZoneWallGuard.java index 25c0ef6..2f7033a 100644 --- a/war/src/main/java/com/tommytony/war/ZoneWallGuard.java +++ b/war/src/main/java/com/tommytony/war/ZoneWallGuard.java @@ -14,9 +14,9 @@ import com.tommytony.war.volumes.BlockInfo; import bukkit.tommytony.war.War; /** - * + * * @author tommytony - * + * */ public class ZoneWallGuard { private Player player; diff --git a/war/src/main/java/com/tommytony/war/jobs/RestoreWarhubJob.java b/war/src/main/java/com/tommytony/war/jobs/RestoreWarhubJob.java index a3db69d..c9a3b3f 100644 --- a/war/src/main/java/com/tommytony/war/jobs/RestoreWarhubJob.java +++ b/war/src/main/java/com/tommytony/war/jobs/RestoreWarhubJob.java @@ -32,7 +32,7 @@ public class RestoreWarhubJob implements Runnable { if (hubStrSplit.length > 3) { worldName = hubStrSplit[3]; world = War.war.getServer().getWorld(worldName); - if(hubStrSplit.length > 4) { + if (hubStrSplit.length > 4) { hubOrientation = hubStrSplit[4]; } } else { diff --git a/war/src/main/java/com/tommytony/war/mappers/PreDeGaulleZoneVolumeMapper.java b/war/src/main/java/com/tommytony/war/mappers/PreDeGaulleZoneVolumeMapper.java index f43c6d6..30f55ff 100644 --- a/war/src/main/java/com/tommytony/war/mappers/PreDeGaulleZoneVolumeMapper.java +++ b/war/src/main/java/com/tommytony/war/mappers/PreDeGaulleZoneVolumeMapper.java @@ -30,9 +30,9 @@ import com.tommytony.war.volumes.ZoneVolume; /** * The ZoneVolumeMapper take the blocks from disk and sets them in the worlds, since the ZoneVolume doesn't hold its blocks in memory like regular Volumes. - * + * * @author tommytony - * + * */ public class PreDeGaulleZoneVolumeMapper { diff --git a/war/src/main/java/com/tommytony/war/mappers/PropertiesFile.java b/war/src/main/java/com/tommytony/war/mappers/PropertiesFile.java index 254c313..1812c34 100644 --- a/war/src/main/java/com/tommytony/war/mappers/PropertiesFile.java +++ b/war/src/main/java/com/tommytony/war/mappers/PropertiesFile.java @@ -10,7 +10,7 @@ import java.util.Properties; /** * Used for accessing and creating .[properties] files, reads them as utf-8, saves as utf-8. Internationalization is key importance especially for character codes. - * + * * @author Nijikokun * @version 1.0.4, %G% */ @@ -27,7 +27,7 @@ public final class PropertiesFile { /** * Creates or opens a properties file using specified filename - * + * * @param fileName */ public PropertiesFile(String fileName) { @@ -48,7 +48,7 @@ public final class PropertiesFile { /** * The loader for property files, it reads the file as UTF8 or converts the string into UTF8. Used for simple runthrough's, loading, or reloading of the file. - * + * * @throws IOException */ public void load() throws IOException { @@ -88,20 +88,20 @@ public final class PropertiesFile { * Returns a Map of all key=value properties in the file as <key (java.lang.String), value (java.lang.String)>
*
* Example:
- * + * *
 	 * PropertiesFile settings = new PropertiesFile("settings.properties");
 	 * Map<String, String> mappedSettings;
-	 *
+	 * 
 	 * try {
 	 * 	mappedSettings = settings.returnMap();
 	 * } catch (Exception ex) {
 	 * 	log.info("Failed mapping settings.properties");
 	 * }
 	 * 
- * + * *
- * + * * @return map - Simple Map HashMap of the entire key=value as <key (java.lang.String), value (java.lang.String)> * @throws Exception * If the properties file doesn't exist. @@ -113,7 +113,7 @@ public final class PropertiesFile { /** * Checks to see if the .[properties] file contains the given key. - * + * * @param var * The key we are going to be checking the existance of. * @return Boolean - True if the key exists, false if it cannot be found. @@ -124,7 +124,7 @@ public final class PropertiesFile { /** * Checks to see if this key exists in the .[properties] file. - * + * * @param var * The key we are grabbing the value of. * @return java.lang.String - True if the key exists, false if it cannot be found. @@ -135,7 +135,7 @@ public final class PropertiesFile { /** * Remove a key from the file if it exists. This will save() which will invoke a load() on the file. - * + * * @see #save() * @param var * The key that will be removed from the file @@ -149,7 +149,7 @@ public final class PropertiesFile { /** * Checks the existance of a key. - * + * * @see #containsKey(java.lang.String) * @param key * The key in question of existance. @@ -161,7 +161,7 @@ public final class PropertiesFile { /** * Returns the value of the key given as a String, however we do not set a string if no key is found. - * + * * @see #getProperty(java.lang.String) * @param key * The key we will retrieve the property from, if no key is found default to "" or empty. @@ -176,7 +176,7 @@ public final class PropertiesFile { /** * Returns the value of the key given as a String. If it is not found, it will invoke saving the default value to the properties file. - * + * * @see #setString(java.lang.String, java.lang.String) * @see #getProperty(java.lang.String) * @param key @@ -196,7 +196,7 @@ public final class PropertiesFile { /** * Save the value given as a String on the specified key. - * + * * @see #save() * @param key * The key that we will be addressing the value to. @@ -210,7 +210,7 @@ public final class PropertiesFile { /** * Returns the value of the key given in a Integer, however we do not set a string if no key is found. - * + * * @see #getProperty(String var) * @param key * The key we will retrieve the property from, if no key is found default to 0 @@ -225,7 +225,7 @@ public final class PropertiesFile { /** * Returns the int value of a key - * + * * @see #setInt(String key, int value) * @param key * The key that we will be grabbing the value from, if no value is found set and return value @@ -245,7 +245,7 @@ public final class PropertiesFile { /** * Save the value given as a int on the specified key. - * + * * @see #save() * @param key * The key that we will be addressing the value to. @@ -260,7 +260,7 @@ public final class PropertiesFile { /** * Returns the value of the key given in a Double, however we do not set a string if no key is found. - * + * * @see #getProperty(String var) * @param key * The key we will retrieve the property from, if no key is found default to 0.0 @@ -275,7 +275,7 @@ public final class PropertiesFile { /** * Returns the double value of a key - * + * * @see #setDouble(String key, double value) * @param key * The key that we will be grabbing the value from, if no value is found set and return value @@ -294,7 +294,7 @@ public final class PropertiesFile { /** * Save the value given as a double on the specified key. - * + * * @see #save() * @param key * The key that we will be addressing the value to. @@ -309,7 +309,7 @@ public final class PropertiesFile { /** * Returns the value of the key given in a Long, however we do not set a string if no key is found. - * + * * @see #getProperty(String var) * @param key * The key we will retrieve the property from, if no key is found default to 0L @@ -324,7 +324,7 @@ public final class PropertiesFile { /** * Returns the long value of a key - * + * * @see #setLong(String key, long value) * @param key * The key that we will be grabbing the value from, if no value is found set and return value @@ -343,7 +343,7 @@ public final class PropertiesFile { /** * Save the value given as a long on the specified key. - * + * * @see #save() * @param key * The key that we will be addressing the value to. @@ -358,7 +358,7 @@ public final class PropertiesFile { /** * Returns the value of the key given in a Boolean, however we do not set a string if no key is found. - * + * * @see #getProperty(String var) * @param key * The key we will retrieve the property from, if no key is found default to false @@ -373,7 +373,7 @@ public final class PropertiesFile { /** * Returns the boolean value of a key - * + * * @see #setBoolean(String key, boolean value) * @param key * The key that we will be grabbing the value from, if no value is found set and return value @@ -392,7 +392,7 @@ public final class PropertiesFile { /** * Save the value given as a boolean on the specified key. - * + * * @see #save() * @param key * The key that we will be addressing the value to. diff --git a/war/src/main/java/com/tommytony/war/mappers/VolumeMapper.java b/war/src/main/java/com/tommytony/war/mappers/VolumeMapper.java index 1f8f497..90540f9 100644 --- a/war/src/main/java/com/tommytony/war/mappers/VolumeMapper.java +++ b/war/src/main/java/com/tommytony/war/mappers/VolumeMapper.java @@ -20,9 +20,9 @@ import bukkit.tommytony.war.War; import com.tommytony.war.volumes.Volume; /** - * + * * @author tommytony - * + * */ public class VolumeMapper { diff --git a/war/src/main/java/com/tommytony/war/mappers/WarMapper.java b/war/src/main/java/com/tommytony/war/mappers/WarMapper.java index 96c5e03..e8503b3 100644 --- a/war/src/main/java/com/tommytony/war/mappers/WarMapper.java +++ b/war/src/main/java/com/tommytony/war/mappers/WarMapper.java @@ -16,9 +16,9 @@ import com.tommytony.war.jobs.RestoreWarhubJob; import com.tommytony.war.jobs.RestoreWarzonesJob; /** - * + * * @author tommytony - * + * */ public class WarMapper { @@ -275,20 +275,20 @@ public class WarMapper { switch (hub.getOrientation()) { case SOUTH: orientationStr = "south"; - break; + break; case EAST: orientationStr = "east"; - break; + break; case NORTH: orientationStr = "north"; - break; + break; case WEST: default: orientationStr = "west"; - break; + break; } hubStr = hub.getLocation().getBlockX() + "," + hub.getLocation().getBlockY() + "," + hub.getLocation().getBlockZ() + "," - + hub.getLocation().getWorld().getName() + "," + orientationStr; + + hub.getLocation().getWorld().getName() + "," + orientationStr; VolumeMapper.save(hub.getVolume(), ""); } warConfig.setString("warhub", hubStr); diff --git a/war/src/main/java/com/tommytony/war/mappers/WarzoneMapper.java b/war/src/main/java/com/tommytony/war/mappers/WarzoneMapper.java index 47773e0..45a77e3 100644 --- a/war/src/main/java/com/tommytony/war/mappers/WarzoneMapper.java +++ b/war/src/main/java/com/tommytony/war/mappers/WarzoneMapper.java @@ -23,9 +23,9 @@ import com.tommytony.war.volumes.Volume; import com.tommytony.war.volumes.ZoneVolume; /** - * + * * @author tommytony - * + * */ public class WarzoneMapper { diff --git a/war/src/main/java/com/tommytony/war/mappers/ZoneVolumeMapper.java b/war/src/main/java/com/tommytony/war/mappers/ZoneVolumeMapper.java index eb30ab0..ba1265b 100644 --- a/war/src/main/java/com/tommytony/war/mappers/ZoneVolumeMapper.java +++ b/war/src/main/java/com/tommytony/war/mappers/ZoneVolumeMapper.java @@ -34,20 +34,23 @@ import com.tommytony.war.volumes.ZoneVolume; /** * The ZoneVolumeMapper take the blocks from disk and sets them in the worlds, since the ZoneVolume doesn't hold its blocks in memory like regular Volumes. - * - * @author tommytony, Tim Düsterhus - * @package com.tommytony.war.mappers + * + * @author tommytony, Tim Düsterhus + * @package com.tommytony.war.mappers */ public class ZoneVolumeMapper { /** * Loads the given volume - * - * @param ZoneVolume volume Volume to load - * @param String zoneName Zone to load the volume from - * @param World world The world the zone is located - * @param boolean onlyLoadCorners Should only the corners be loaded - * @return integer Changed blocks + * + * @param ZoneVolume + * volume Volume to load + * @param String + * zoneName Zone to load the volume from + * @param World + * world The world the zone is located + * @param boolean onlyLoadCorners Should only the corners be loaded + * @return integer Changed blocks */ public static int load(ZoneVolume volume, String zoneName, World world, boolean onlyLoadCorners) { File cornersFile = new File(War.war.getDataFolder().getPath() + "/dat/warzone-" + zoneName + "/volume-" + volume.getName() + ".corners"); @@ -274,9 +277,10 @@ public class ZoneVolumeMapper { /** * Parses an inventory string - * - * @param String invString string to parse - * @return List Parsed items + * + * @param String + * invString string to parse + * @return List Parsed items */ private static List readInventoryString(String invString) { List items = new ArrayList(); @@ -305,10 +309,12 @@ public class ZoneVolumeMapper { /** * Saves the given volume - * - * @param Volume volume Volume to save - * @param String zoneName The warzone the volume is located - * @return integer Number of written blocks + * + * @param Volume + * volume Volume to save + * @param String + * zoneName The warzone the volume is located + * @return integer Number of written blocks */ public static int save(Volume volume, String zoneName) { int noOfSavedBlocks = 0; @@ -472,11 +478,14 @@ public class ZoneVolumeMapper { /** * Saves the Volume as a background-job - * - * @param ZoneVolme volume volume to save - * @param String zoneName The zone the volume is located - * @param War war Instance of war - * @param long tickDelay delay before beginning the task + * + * @param ZoneVolme + * volume volume to save + * @param String + * zoneName The zone the volume is located + * @param War + * war Instance of war + * @param long tickDelay delay before beginning the task */ private static void saveAsJob(ZoneVolume volume, String zoneName, long tickDelay) { ZoneVolumeSaveJob job = new ZoneVolumeSaveJob(volume, zoneName); @@ -485,9 +494,11 @@ public class ZoneVolumeMapper { /** * Deletes the given volume - * - * @param Volume volume volume to delete - * @param War war Instance of war + * + * @param Volume + * volume volume to delete + * @param War + * war Instance of war */ public static void delete(Volume volume) { ZoneVolumeMapper.deleteFile("War/dat/volume-" + volume.getName() + ".dat"); @@ -499,9 +510,11 @@ public class ZoneVolumeMapper { /** * Deletes a volume file - * - * @param String path path of file - * @param War war Instance of war + * + * @param String + * path path of file + * @param War + * war Instance of war */ private static void deleteFile(String path) { File volFile = new File(path); @@ -512,4 +525,4 @@ public class ZoneVolumeMapper { } } } -} \ No newline at end of file +} diff --git a/war/src/main/java/com/tommytony/war/utils/ChatFixUtil.java b/war/src/main/java/com/tommytony/war/utils/ChatFixUtil.java index 361c98c..192b7ee 100644 --- a/war/src/main/java/com/tommytony/war/utils/ChatFixUtil.java +++ b/war/src/main/java/com/tommytony/war/utils/ChatFixUtil.java @@ -6,15 +6,15 @@ import org.bukkit.command.CommandSender; /** * The purpose of this tool is twofold: 1: Avoid client crashes due to bad color formating. 2: Make color continue on word wrapping - * + * * In minecraft the degree sign is used as a prefix to another char to create a color. For example the code for white is "\u00A7f". The "\u00A7" is the unicode notation for the degree sign and the "f" means white. - * + * * When does minecraft wrap the text? After how many chars? Answer: Because the font isn't monospace this differs depending on what you write. However we can fit 53 "M" without wrapping and the 54th char would then wrap (be at the beginning of the next line instead) As there is no broader char than "M" we can know for sure the minimum line length is 53. Note that this means the number of DISPLAYED chars per row is 53. A degree sign and the char after will NOT count, as they will not be displayed as chars. - * + * * Good to know: Numbers have the same font width as an M. - * + * * When does the client crash? Answer: When a row ends with a degree char and optionally another sign after. Another way to say the same: When a line ends with either a broken or valid color notation. AND The client will ALWAYS crash if the sign after the last displayed char in a row is a degree char. A goofy way to explatin it: For a line with only "M" and numbers, the fiftyfourth "displayed char" musn't be a degree sign. - * + * * WARNING: Above is a hypothesis I have created based on what my experiments have shown. I am fairly sure it is correct but please help me test it further. */ public class ChatFixUtil { @@ -23,13 +23,13 @@ public class ChatFixUtil { /** * This method wraps the msg for you at row lengths of 53, avoids client crash scenarios and makes the previous color continue on the next line. - * + * * The upsides with filtering your messages through this method are: - No client crashes. - Line wrapping with preserved color. - * + * * The downsides are: - The width of the chat window will not be used to it's fullest. For example you can fit more that 53 commas (,) in a chatwindow row but the line would break after 53 displayed chars. - * + * * Suggested usage: NO NEED TO USE the fix method for static help pages in your plugin. As the text is static you can make sure there is no client crash yourself and be able to use the full line length. - * + * * DO USE in cases like where you output colored messages with playernames in your plugin. As the player names have different length there is potential for client crash. */ public static ArrayList fix(String msg) { diff --git a/war/src/main/java/com/tommytony/war/utils/DeferredBlockReset.java b/war/src/main/java/com/tommytony/war/utils/DeferredBlockReset.java index de7d403..8abb9ef 100644 --- a/war/src/main/java/com/tommytony/war/utils/DeferredBlockReset.java +++ b/war/src/main/java/com/tommytony/war/utils/DeferredBlockReset.java @@ -50,4 +50,4 @@ public class DeferredBlockReset { public String[] getLines() { return this.lines; } -} \ No newline at end of file +} diff --git a/war/src/main/java/com/tommytony/war/volumes/BlockInfo.java b/war/src/main/java/com/tommytony/war/volumes/BlockInfo.java index 83d78ee..6e55f07 100644 --- a/war/src/main/java/com/tommytony/war/volumes/BlockInfo.java +++ b/war/src/main/java/com/tommytony/war/volumes/BlockInfo.java @@ -5,9 +5,9 @@ import org.bukkit.World; import org.bukkit.block.Block; /** - * + * * @author tommytony - * + * */ public class BlockInfo { private int x; diff --git a/war/src/main/java/com/tommytony/war/volumes/CenteredVolume.java b/war/src/main/java/com/tommytony/war/volumes/CenteredVolume.java index 530f92f..c3894d1 100644 --- a/war/src/main/java/com/tommytony/war/volumes/CenteredVolume.java +++ b/war/src/main/java/com/tommytony/war/volumes/CenteredVolume.java @@ -5,9 +5,9 @@ import org.bukkit.World; import org.bukkit.block.Block; /** - * - * @author tommytony - * @deprecated Broken, don't use. + * + * @author tommytony + * @deprecated Broken, don't use. */ @Deprecated public class CenteredVolume extends Volume { diff --git a/war/src/main/java/com/tommytony/war/volumes/VerticalVolume.java b/war/src/main/java/com/tommytony/war/volumes/VerticalVolume.java index fad1a4d..4644e73 100644 --- a/war/src/main/java/com/tommytony/war/volumes/VerticalVolume.java +++ b/war/src/main/java/com/tommytony/war/volumes/VerticalVolume.java @@ -10,9 +10,9 @@ import org.bukkit.block.BlockFace; import bukkit.tommytony.war.War; /** - * + * * @author tommytony - * + * */ @Deprecated public class VerticalVolume extends Volume { diff --git a/war/src/main/java/com/tommytony/war/volumes/Volume.java b/war/src/main/java/com/tommytony/war/volumes/Volume.java index 1af4790..caf04b5 100644 --- a/war/src/main/java/com/tommytony/war/volumes/Volume.java +++ b/war/src/main/java/com/tommytony/war/volumes/Volume.java @@ -22,9 +22,9 @@ import bukkit.tommytony.war.War; import com.tommytony.war.jobs.BlockResetJob; /** - * + * * @author tommytony - * + * */ public class Volume { private final String name; diff --git a/war/src/main/java/com/tommytony/war/volumes/ZoneVolume.java b/war/src/main/java/com/tommytony/war/volumes/ZoneVolume.java index 1013398..1f669da 100644 --- a/war/src/main/java/com/tommytony/war/volumes/ZoneVolume.java +++ b/war/src/main/java/com/tommytony/war/volumes/ZoneVolume.java @@ -11,9 +11,9 @@ import com.tommytony.war.Warzone; import com.tommytony.war.mappers.ZoneVolumeMapper; /** - * + * * @author tommytony - * + * */ public class ZoneVolume extends Volume {