Update ServerControl.java (#339)

* Update ServerControl.java

Hopefully made core fill for teams.

* Fixed compile errors and incorrect team handling
This commit is contained in:
Milinai
2018-11-17 18:57:10 +01:00
committed by Anuken
parent 1251680a1c
commit 03268a5575

View File

@@ -356,12 +356,19 @@ public class ServerControl extends Module{
return; return;
} }
for(Item item : content.items()){ try{
if(item.type == ItemType.material){ Team team = Team.valueOf(arg[0]);
state.teams.get(Team.blue).cores.first().entity.items.add(item, 2000);
for(Item item : content.items()){
if(item.type == ItemType.material){
state.teams.get(team).cores.first().entity.items.add(item, 2000);
}
} }
info("Core filled.");
}catch(IllegalArgumentException ignored){
err("No such team exists.");
} }
info("Core filled.");
}); });
handler.register("crashreport", "<on/off>", "Disables or enables automatic crash reporting", arg -> { handler.register("crashreport", "<on/off>", "Disables or enables automatic crash reporting", arg -> {