@ -69,6 +69,24 @@ public final class SimulatorGroup {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void moveToX(double x) {
|
||||||
|
elements.forEach(simulatorElement -> {
|
||||||
|
simulatorElement.getPosition().setX(x);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
public void moveToY(double y) {
|
||||||
|
elements.forEach(simulatorElement -> {
|
||||||
|
simulatorElement.getPosition().setX(y);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
public void moveToZ(double z) {
|
||||||
|
elements.forEach(simulatorElement -> {
|
||||||
|
simulatorElement.getPosition().setX(z);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
public SWItem toItem(Player player, InvCallback groupCallback, InvCallback itemCallback) {
|
public SWItem toItem(Player player, InvCallback groupCallback, InvCallback itemCallback) {
|
||||||
if (elements.size() == 1) {
|
if (elements.size() == 1) {
|
||||||
return elements.get(0).toItem(player, itemCallback);
|
return elements.get(0).toItem(player, itemCallback);
|
||||||
|
@ -168,6 +168,14 @@ public class SimulatorGroupSettingsGui extends SimulatorBaseGui {
|
|||||||
SimulatorWatcher.update(simulator);
|
SimulatorWatcher.update(simulator);
|
||||||
});
|
});
|
||||||
inventory.setItem(24, new SWItem(Material.PAPER, "§eX", clickType -> {
|
inventory.setItem(24, new SWItem(Material.PAPER, "§eX", clickType -> {
|
||||||
|
new SimulatorAnvilGui<>(player, "X", "", Double::parseDouble, number -> {
|
||||||
|
if(!allTNT){
|
||||||
|
number = (double) Math.round(number);
|
||||||
|
}
|
||||||
|
simulatorGroup.moveToX(number);
|
||||||
|
SimulatorWatcher.update(simulator);
|
||||||
|
return true;
|
||||||
|
}, this).setItem(Material.PAPER).open();
|
||||||
}));
|
}));
|
||||||
inventory.setItem(33, SWItem.getDye(1), "§e-1", Arrays.asList(allTNT ? "§7Shift§8: §e-0.0625" : "§7Shift§8: §e-5"), false, clickType -> {
|
inventory.setItem(33, SWItem.getDye(1), "§e-1", Arrays.asList(allTNT ? "§7Shift§8: §e-0.0625" : "§7Shift§8: §e-5"), false, clickType -> {
|
||||||
simulatorGroup.move(clickType.isShiftClick() ? (allTNT ? -0.0625 : -5) : -1, 0, 0);
|
simulatorGroup.move(clickType.isShiftClick() ? (allTNT ? -0.0625 : -5) : -1, 0, 0);
|
||||||
@ -180,6 +188,14 @@ public class SimulatorGroupSettingsGui extends SimulatorBaseGui {
|
|||||||
SimulatorWatcher.update(simulator);
|
SimulatorWatcher.update(simulator);
|
||||||
});
|
});
|
||||||
inventory.setItem(25, new SWItem(Material.PAPER, "§eY", clickType -> {
|
inventory.setItem(25, new SWItem(Material.PAPER, "§eY", clickType -> {
|
||||||
|
new SimulatorAnvilGui<>(player, "Y", "", Double::parseDouble, number -> {
|
||||||
|
if(!allTNT){
|
||||||
|
number = (double) Math.round(number);
|
||||||
|
}
|
||||||
|
simulatorGroup.moveToY(number);
|
||||||
|
SimulatorWatcher.update(simulator);
|
||||||
|
return true;
|
||||||
|
}, this).setItem(Material.PAPER).open();
|
||||||
}));
|
}));
|
||||||
inventory.setItem(34, SWItem.getDye(1), "§e-1", Arrays.asList(allTNT ? "§7Shift§8: §e-0.0625" : "§7Shift§8: §e-5"), false, clickType -> {
|
inventory.setItem(34, SWItem.getDye(1), "§e-1", Arrays.asList(allTNT ? "§7Shift§8: §e-0.0625" : "§7Shift§8: §e-5"), false, clickType -> {
|
||||||
simulatorGroup.move(0, clickType.isShiftClick() ? (allTNT ? -0.0625 : -5) : -1, 0);
|
simulatorGroup.move(0, clickType.isShiftClick() ? (allTNT ? -0.0625 : -5) : -1, 0);
|
||||||
@ -192,6 +208,14 @@ public class SimulatorGroupSettingsGui extends SimulatorBaseGui {
|
|||||||
SimulatorWatcher.update(simulator);
|
SimulatorWatcher.update(simulator);
|
||||||
});
|
});
|
||||||
inventory.setItem(26, new SWItem(Material.PAPER, "§eZ", clickType -> {
|
inventory.setItem(26, new SWItem(Material.PAPER, "§eZ", clickType -> {
|
||||||
|
new SimulatorAnvilGui<>(player, "Z", "", Double::parseDouble, number -> {
|
||||||
|
if(!allTNT){
|
||||||
|
number = (double) Math.round(number);
|
||||||
|
}
|
||||||
|
simulatorGroup.moveToZ(number);
|
||||||
|
SimulatorWatcher.update(simulator);
|
||||||
|
return true;
|
||||||
|
}, this).setItem(Material.PAPER).open();
|
||||||
}));
|
}));
|
||||||
inventory.setItem(35, SWItem.getDye(1), "§e-1", Arrays.asList(allTNT ? "§7Shift§8: §e-0.0625" : "§7Shift§8: §e-5"), false, clickType -> {
|
inventory.setItem(35, SWItem.getDye(1), "§e-1", Arrays.asList(allTNT ? "§7Shift§8: §e-0.0625" : "§7Shift§8: §e-5"), false, clickType -> {
|
||||||
simulatorGroup.move(0, 0, clickType.isShiftClick() ? (allTNT ? -0.0625 : -5) : -1);
|
simulatorGroup.move(0, 0, clickType.isShiftClick() ? (allTNT ? -0.0625 : -5) : -1);
|
||||||
|
In neuem Issue referenzieren
Einen Benutzer sperren