SimRework2.0 #216
@ -31,6 +31,7 @@ import org.bukkit.Material;
|
|||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
|
import java.util.Iterator;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
public class SimulatorGui extends SimulatorPageGui<SimulatorGroup> {
|
public class SimulatorGui extends SimulatorPageGui<SimulatorGroup> {
|
||||||
@ -46,7 +47,12 @@ public class SimulatorGui extends SimulatorPageGui<SimulatorGroup> {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void headerAndFooter() {
|
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 -> {
|
inventory.setItem(4, new SWItem(simulator.getMaterial(), "§e" + simulator.getName(), clickType -> {
|
||||||
new SimulatorMaterialGui(player, simulator, simulator::getMaterial, simulator::setMaterial, this).open();
|
new SimulatorMaterialGui(player, simulator, simulator::getMaterial, simulator::setMaterial, this).open();
|
||||||
}));
|
}));
|
||||||
|
In neuem Issue referenzieren
Einen Benutzer sperren