v0.88.2 - Added /ma notready

This commit is contained in:
Garbage Mule 2011-06-04 20:05:55 +02:00
parent 9b795c3174
commit 4145c4f5d7
5 changed files with 51 additions and 16 deletions

Binary file not shown.

View File

@ -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.
/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.

View File

@ -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<Player> notReadySet = new HashSet<Player>(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);
}
/* ///////////////////////////////////////////////////////////////////// //

View File

@ -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;
}

View File

@ -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()
{