diff --git a/MobArena.jar b/MobArena.jar index b1b6bfd..eacd86f 100644 Binary files a/MobArena.jar and b/MobArena.jar differ diff --git a/bin/plugin.yml b/bin/plugin.yml index dd2ba60..dd2582b 100644 --- a/bin/plugin.yml +++ b/bin/plugin.yml @@ -1,19 +1,28 @@ name: MobArena main: com.garbagemule.MobArena.MobArena -version: 0.88.1 +version: 0.88.2 commands: - mobarena: - description: Base command for MobArena - usage: | - /mobarena join - Join the arena. - /mobarena leave - Leave the arena. - marena: - description: Base command for MobArena - usage: | - /marena join - Join the arena. - /marena leave - Leave the arena. ma: description: Base command for MobArena usage: | - /ma join - Join the arena. - /ma leave - Leave the arena. \ No newline at end of file + /ma join - Join the arena. + /ma leave - Leave the arena. + /ma list - List of players in the arena. + /ma notready - List of players who aren't ready. + /ma spectator - Warp to the spectator area. + marena: + description: Base command for MobArena + usage: | + /marena join - Join the arena. + /marena leave - Leave the arena. + /marena list - List of players in the arena. + /marena notready - List of players who aren't ready. + /marena spectator - Warp to the spectator area. + mobarena: + description: Base command for MobArena + usage: | + /mobarena join - Join the arena. + /mobarena leave - Leave the arena. + /mobarena list - List of players in the arena. + /mobarena notready - List of players who aren't ready. + /mobarena spectator - Warp to the spectator area. \ No newline at end of file diff --git a/src/com/garbagemule/MobArena/ArenaManager.java b/src/com/garbagemule/MobArena/ArenaManager.java index 2672a3f..0c4e4b3 100644 --- a/src/com/garbagemule/MobArena/ArenaManager.java +++ b/src/com/garbagemule/MobArena/ArenaManager.java @@ -309,14 +309,34 @@ public class ArenaManager String list = ""; for (Player player : playerSet) - { list += player.getName() + ", "; - } list = list.substring(0,list.length()-2); tellPlayer(p, "Survivors: " + list); } + /** + * Prints the list of players who aren't ready. + */ + public static void notReadyList(Player p) + { + if (!playerSet.contains(p) || isRunning) + { + tellPlayer(p, "You aren't in the lobby!"); + return; + } + + Set notReadySet = new HashSet(playerSet); + notReadySet.removeAll(readySet); + + String list = ""; + for (Player player : notReadySet) + list += player.getName() + ", "; + list = list.substring(0,list.length()-2); + + tellPlayer(p, "Not ready: " + list); + } + /* ///////////////////////////////////////////////////////////////////// // diff --git a/src/com/garbagemule/MobArena/MACommands.java b/src/com/garbagemule/MobArena/MACommands.java index e722e3c..45f4441 100644 --- a/src/com/garbagemule/MobArena/MACommands.java +++ b/src/com/garbagemule/MobArena/MACommands.java @@ -85,6 +85,12 @@ public class MACommands implements CommandExecutor ArenaManager.playerSpectate(p); return true; } + + if (cmd.equals("ready") || cmd.equals("notready")) + { + ArenaManager.notReadyList(p); + return true; + } return false; } diff --git a/src/com/garbagemule/MobArena/MobArena.java b/src/com/garbagemule/MobArena/MobArena.java index 55c49a5..c164a98 100644 --- a/src/com/garbagemule/MobArena/MobArena.java +++ b/src/com/garbagemule/MobArena/MobArena.java @@ -21,7 +21,7 @@ public class MobArena extends JavaPlugin * or Mean Admins. */ public final String[] COMMANDS = {"join", "j", "leave", "l", "list", "who", "spectate", "spec", "setwarp", "addspawn", "delspawn", "setregion", "expandregion", - "protect", "undo", "dooooo", "reset"}; + "protect", "undo", "dooooo", "reset", "ready", "notready"}; public MobArena() {