Add rmoval of empty group
Dieser Commit ist enthalten in:
Ursprung
6e39f3e92a
Commit
b5a81eb6db
@ -31,6 +31,7 @@ import org.bukkit.Material;
|
||||
import org.bukkit.entity.Player;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Iterator;
|
||||
import java.util.List;
|
||||
|
||||
public class SimulatorGui extends SimulatorPageGui<SimulatorGroup> {
|
||||
@ -46,7 +47,12 @@ public class SimulatorGui extends SimulatorPageGui<SimulatorGroup> {
|
||||
|
||||
@Override
|
||||
public void headerAndFooter() {
|
||||
// TODO: Remove empty Groups
|
||||
for(Iterator<SimulatorGroup> i = simulator.getElements().iterator(); i.hasNext();){
|
||||
if(i.next().getElements().isEmpty()){
|
||||
i.remove();
|
||||
}
|
||||
}
|
||||
|
||||
inventory.setItem(4, new SWItem(simulator.getMaterial(), "§e" + simulator.getName(), clickType -> {
|
||||
new SimulatorMaterialGui(player, simulator, simulator::getMaterial, simulator::setMaterial, this).open();
|
||||
}));
|
||||
|
In neuem Issue referenzieren
Einen Benutzer sperren