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
+22 -2
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);
}
/* ///////////////////////////////////////////////////////////////////// //
@@ -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;
}
+1 -1
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()
{