SteamWar/BauSystem2.0
Archiviert
12
0

Removed parent group from group chooser menu

Dieser Commit ist enthalten in:
D4rkr34lm 2023-10-22 12:43:20 +02:00 committet von yoyosource
Ursprung f6ee55c44f
Commit 933e4fe7d9
2 geänderte Dateien mit 4 neuen und 2 gelöschten Zeilen

Datei anzeigen

@ -35,6 +35,7 @@ import org.bukkit.event.inventory.ClickType;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import java.util.stream.Collectors;
public class SimulatorRedstoneGui extends SimulatorScrollGui<RedstonePhase> {
@ -91,7 +92,7 @@ public class SimulatorRedstoneGui extends SimulatorScrollGui<RedstonePhase> {
//Group chooser
inventory.setItem(49, new SWItem(Material.LEAD, "§eMove", clickType -> {
new SimulatorGroupChooserGui(player, simulator, simulator.getElements(), redstone, simulatorGroup, this).open();
new SimulatorGroupChooserGui(player, simulator, simulator.getElements().stream().filter( e -> e != simulatorGroup).collect(Collectors.toList()), redstone, simulatorGroup, this).open();
}));
//Enable/Disable

Datei anzeigen

@ -36,6 +36,7 @@ import org.bukkit.event.inventory.ClickType;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import java.util.stream.Collectors;
public class SimulatorTNTGui extends SimulatorScrollGui<TNTPhase> {
@ -89,7 +90,7 @@ public class SimulatorTNTGui extends SimulatorScrollGui<TNTPhase> {
new SimulatorTNTSettingsGui(player, simulator, tnt, this).open();
}));
inventory.setItem(49, new SWItem(Material.LEAD, "§eMove", clickType -> {
new SimulatorGroupChooserGui(player, simulator, simulator.getElements(), tnt, parent, this).open();
new SimulatorGroupChooserGui(player, simulator, simulator.getElements().stream().filter( e -> e != parent).collect(Collectors.toList()), tnt, parent, this).open();
}));
inventory.setItem(50, new SWItem(tnt.isDisabled() ? Material.ENDER_PEARL : Material.ENDER_EYE, tnt.isDisabled() ? "§cDisabled" : "§aEnabled", clickType -> {
tnt.setDisabled(!tnt.isDisabled());