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:
@@ -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 -> {
|
||||||
|
|||||||
Reference in New Issue
Block a user