Started coding up IDLE commands

This commit is contained in:
alisolarflare 2016-11-05 14:28:23 -04:00
parent 6cc48f2a5b
commit a68d39a784
2 changed files with 140 additions and 101 deletions

View file

@ -30,6 +30,17 @@ public class AddToUHC extends TBMCCommandBase {
sender.sendMessage("You must supply at least one playername");
}
switch(match.getMatchState()){
case IDLE:
case WAITING:
case SETUP:
case INTRO:
case PEACE:
case TENSION:
case POWER:
case END:
}
// Adds players to memory
for (int i = 0; i > args.length; i++) {
match.playerList.add(player.getName());

View file

@ -1,6 +1,7 @@
package alisolarflare.uhc.idle;
import org.bukkit.command.CommandSender;
import org.bukkit.entity.Player;
import alisolarflare.uhc.memory.UHCMatch;
import buttondevteam.lib.chat.TBMCCommandBase;
@ -21,6 +22,33 @@ public class JoinUHC extends TBMCCommandBase{
@Override
public boolean OnCommand(CommandSender sender, String alias, String[] args) {
if (!(sender instanceof Player))
return false;
Player player = (Player) sender;
player.sendMessage("Adding you to the UltraHardcore match!");
switch(match.getMatchState()){
//Before the game
case IDLE:
case WAITING:
case SETUP:
case INTRO:
player.sendMessage("Adding you to the UltraHardcore match!");
match.playerList.add(player.getName());
break;
//During the game
case PEACE:
case TENSION:
case POWER:
player.sendMessage("There is currently an UltraHardcore match going on! #POINTTOSPECTATORMODE, tell Ali asap if you see this");
//After the game
case END:
player.sendMessage("There is currently an ending ceremony going on! #POINTTOCEREMONY, tell Ali ASAP if you see this");
}
return false;
}