From 6cb404b0d78ea8fafbbb2221addcfe3b3842702f Mon Sep 17 00:00:00 2001 From: addstar Date: Sun, 25 Jan 2015 00:39:31 +1100 Subject: [PATCH] Use per-arena configurable block announcer values instead of a global one (disable by setting to 0) --- src/nl/Steffion/BlockHunt/Arena.java | 10 +++++++--- src/nl/Steffion/BlockHunt/ConfigC.java | 2 -- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/src/nl/Steffion/BlockHunt/Arena.java b/src/nl/Steffion/BlockHunt/Arena.java index 52a4090..0a9bc9c 100644 --- a/src/nl/Steffion/BlockHunt/Arena.java +++ b/src/nl/Steffion/BlockHunt/Arena.java @@ -27,6 +27,7 @@ public class Arena implements ConfigurationSerializable { public int waitingTimeSeeker; public int gameTime; public int timeUntilHidersSword; + public int blockAnnouncerTime; public ArrayList disguiseBlocks; public LocationSerializable lobbyWarp; public LocationSerializable hidersWarp; @@ -46,7 +47,7 @@ public class Arena implements ConfigurationSerializable { public Scoreboard scoreboard; public Arena(String arenaName, LocationSerializable pos1, LocationSerializable pos2, int maxPlayers, int minPlayers, int amountSeekersOnStart, - int timeInLobbyUntilStart, int waitingTimeSeeker, int gameTime, int timeUntilHidersSword, ArrayList disguiseBlocks, + int timeInLobbyUntilStart, int waitingTimeSeeker, int gameTime, int timeUntilHidersSword, int blockAnnouncerTime, ArrayList disguiseBlocks, LocationSerializable lobbyWarp, LocationSerializable hidersWarp, LocationSerializable seekersWarp, LocationSerializable spawnWarp, List seekersWinCommands, List hidersWinCommands, List allowedCommands, int seekersTokenWin, int hidersTokenWin, int killTokens, List playersInArena, ArenaState gameState, int timer, List seekers, Scoreboard scoreboard) { @@ -60,6 +61,7 @@ public class Arena implements ConfigurationSerializable { this.waitingTimeSeeker = waitingTimeSeeker; this.gameTime = gameTime; this.timeUntilHidersSword = timeUntilHidersSword; + this.blockAnnouncerTime = blockAnnouncerTime; this.disguiseBlocks = disguiseBlocks; this.lobbyWarp = lobbyWarp; this.hidersWarp = hidersWarp; @@ -89,7 +91,8 @@ public class Arena implements ConfigurationSerializable { timeUntilHidersSword, hidersTokenWin, seekersTokenWin, - killTokens; + killTokens, + blockAnnouncerTime; } public enum ArenaState { @@ -111,6 +114,7 @@ public class Arena implements ConfigurationSerializable { map.put("amountSeekersOnStart", amountSeekersOnStart); map.put("timeInLobbyUntilStart", timeInLobbyUntilStart); map.put("waitingTimeSeeker", waitingTimeSeeker); + map.put("blockAnnouncerTime", blockAnnouncerTime); map.put("gameTime", gameTime); map.put("timeUntilHidersSword", timeUntilHidersSword); map.put("disguiseBlocks", disguiseBlocks); @@ -133,7 +137,7 @@ public class Arena implements ConfigurationSerializable { return new Arena((String) M.g(map, "arenaName", "UNKNOWN_NAME"), (LocationSerializable) M.g(map, "pos1", loc), (LocationSerializable) M.g(map, "pos2", loc), (Integer) M.g(map, "maxPlayers", 12), (Integer) M.g(map, "minPlayers", 3), (Integer) M.g(map, "amountSeekersOnStart", 1), (Integer) M.g(map, "timeInLobbyUntilStart", 90), (Integer) M.g(map, "waitingTimeSeeker", 20), (Integer) M.g(map, "gameTime", 200), (Integer) M.g(map, - "timeUntilHidersSword", 30), (ArrayList) M.g(map, "disguiseBlocks", new ArrayList()), (LocationSerializable) M.g(map, + "timeUntilHidersSword", 30), (Integer) M.g(map, "blockAnnouncerTime", 45), (ArrayList) M.g(map, "disguiseBlocks", new ArrayList()), (LocationSerializable) M.g(map, "lobbyWarp", loc), (LocationSerializable) M.g(map, "hidersWarp", loc), (LocationSerializable) M.g(map, "seekersWarp", loc), (LocationSerializable) M.g(map, "spawnWarp", loc), (ArrayList) M.g(map, "seekersWinCommands", new ArrayList()), (ArrayList) M.g( map, "hidersWinCommands", new ArrayList()), (ArrayList) M.g(map, "allowedCommands", new ArrayList()), (Integer) M.g(map, diff --git a/src/nl/Steffion/BlockHunt/ConfigC.java b/src/nl/Steffion/BlockHunt/ConfigC.java index aedd825..470561c 100644 --- a/src/nl/Steffion/BlockHunt/ConfigC.java +++ b/src/nl/Steffion/BlockHunt/ConfigC.java @@ -50,8 +50,6 @@ public enum ConfigC { requireInventoryClearOnJoin(false, W.config), - blockAnnouncer_enabled(true, W.config), blockAnnouncer_timer(20, W.config), - log_enabledPlugin("%TAG%N%name%&a&k + %N%version% is now Enabled. Made by %A%autors%%N.", W.messages), log_disabledPlugin( "%TAG%N%name%&c&k - %N%version% is now Disabled. Made by %A%autors%%N.", W.messages),