Fixed fillitems command

This commit is contained in:
Anuken 2018-11-21 21:17:45 -05:00
parent d498ac89f2
commit 7795a690ed

View File

@ -350,14 +350,19 @@ public class ServerControl extends Module{
}
});
handler.register("fillitems", "Fill the core with 2000 items.", arg -> {
handler.register("fillitems", "[team]", "Fill the core with 2000 items.", arg -> {
if(!state.is(State.playing)){
err("Not playing. Host first.");
return;
}
try{
Team team = Team.valueOf(arg[0]);
Team team = arg.length == 0 ? Team.blue : Team.valueOf(arg[0]);
if(state.teams.get(team).cores.isEmpty()){
err("That team has no cores.");
return;
}
for(Item item : content.items()){
if(item.type == ItemType.material){