Signed-off-by: yoyosource <yoyosource@nidido.de>
Dieser Commit ist enthalten in:
Ursprung
1804dbc27d
Commit
cc7cd81abe
@ -114,7 +114,7 @@ public class TNTElementGUI {
|
|||||||
ChangePosition.show(inv, player, tntSimulator, tntElement, tntElement::getOwnPosition, x -> x - tntElement.getParentPosition().getX(), y -> y - tntElement.getParentPosition().getY(), z -> z - tntElement.getParentPosition().getZ(), () -> editLocation(player, tntElement, back));
|
ChangePosition.show(inv, player, tntSimulator, tntElement, tntElement::getOwnPosition, x -> x - tntElement.getParentPosition().getX(), y -> y - tntElement.getParentPosition().getY(), z -> z - tntElement.getParentPosition().getZ(), () -> editLocation(player, tntElement, back));
|
||||||
|
|
||||||
// Alignment
|
// Alignment
|
||||||
inv.setItem(23, new SWItem(Material.OAK_BUTTON, BauSystem.MESSAGE.parse("SIMULATOR_ALIGNMENT_NEGATIVE_Z", player), clickType -> { // Z negative
|
inv.setItem(23, new SWItem(Material.OAK_BUTTON, "§a" + BauSystem.MESSAGE.parse("SIMULATOR_ALIGNMENT_NEGATIVE_Z", player), clickType -> { // Z negative
|
||||||
if (tntSimulator != null) tntSimulator.hide(tntElement);
|
if (tntSimulator != null) tntSimulator.hide(tntElement);
|
||||||
Vector position = tntElement.getPosition();
|
Vector position = tntElement.getPosition();
|
||||||
align(position, new Vector(0, 0, 0.49));
|
align(position, new Vector(0, 0, 0.49));
|
||||||
@ -122,7 +122,7 @@ public class TNTElementGUI {
|
|||||||
if (tntSimulator != null) tntSimulator.show(tntElement);
|
if (tntSimulator != null) tntSimulator.show(tntElement);
|
||||||
tntElement.change();
|
tntElement.change();
|
||||||
}));
|
}));
|
||||||
inv.setItem(25, new SWItem(Material.OAK_BUTTON, BauSystem.MESSAGE.parse("SIMULATOR_ALIGNMENT_POSITIVE_Z", player), clickType -> { // Z positive
|
inv.setItem(25, new SWItem(Material.OAK_BUTTON, "§b" + BauSystem.MESSAGE.parse("SIMULATOR_ALIGNMENT_POSITIVE_Z", player), clickType -> { // Z positive
|
||||||
if (tntSimulator != null) tntSimulator.hide(tntElement);
|
if (tntSimulator != null) tntSimulator.hide(tntElement);
|
||||||
Vector position = tntElement.getPosition();
|
Vector position = tntElement.getPosition();
|
||||||
align(position, new Vector(0, 0, 0.51));
|
align(position, new Vector(0, 0, 0.51));
|
||||||
@ -130,7 +130,7 @@ public class TNTElementGUI {
|
|||||||
if (tntSimulator != null) tntSimulator.show(tntElement);
|
if (tntSimulator != null) tntSimulator.show(tntElement);
|
||||||
tntElement.change();
|
tntElement.change();
|
||||||
}));
|
}));
|
||||||
inv.setItem(15, new SWItem(Material.OAK_BUTTON, BauSystem.MESSAGE.parse("SIMULATOR_ALIGNMENT_POSITIVE_X", player), clickType -> { // X positive
|
inv.setItem(15, new SWItem(Material.OAK_BUTTON, "§c" + BauSystem.MESSAGE.parse("SIMULATOR_ALIGNMENT_POSITIVE_X", player), clickType -> { // X positive
|
||||||
if (tntSimulator != null) tntSimulator.hide(tntElement);
|
if (tntSimulator != null) tntSimulator.hide(tntElement);
|
||||||
Vector position = tntElement.getPosition();
|
Vector position = tntElement.getPosition();
|
||||||
align(position, new Vector(0.51, 0, 0));
|
align(position, new Vector(0.51, 0, 0));
|
||||||
@ -138,7 +138,7 @@ public class TNTElementGUI {
|
|||||||
if (tntSimulator != null) tntSimulator.show(tntElement);
|
if (tntSimulator != null) tntSimulator.show(tntElement);
|
||||||
tntElement.change();
|
tntElement.change();
|
||||||
}));
|
}));
|
||||||
inv.setItem(33, new SWItem(Material.OAK_BUTTON, BauSystem.MESSAGE.parse("SIMULATOR_ALIGNMENT_NEGATIVE_X", player), clickType -> { // X negative
|
inv.setItem(33, new SWItem(Material.OAK_BUTTON, "§e" + BauSystem.MESSAGE.parse("SIMULATOR_ALIGNMENT_NEGATIVE_X", player), clickType -> { // X negative
|
||||||
if (tntSimulator != null) tntSimulator.hide(tntElement);
|
if (tntSimulator != null) tntSimulator.hide(tntElement);
|
||||||
Vector position = tntElement.getPosition();
|
Vector position = tntElement.getPosition();
|
||||||
align(position, new Vector(0.49, 0, 0));
|
align(position, new Vector(0.49, 0, 0));
|
||||||
@ -146,7 +146,7 @@ public class TNTElementGUI {
|
|||||||
if (tntSimulator != null) tntSimulator.show(tntElement);
|
if (tntSimulator != null) tntSimulator.show(tntElement);
|
||||||
tntElement.change();
|
tntElement.change();
|
||||||
}));
|
}));
|
||||||
inv.setItem(24, new SWItem(Material.SUNFLOWER, BauSystem.MESSAGE.parse("SIMULATOR_ALIGNMENT_CENTER", player), clickType -> { // CENTER
|
inv.setItem(24, new SWItem(Material.SUNFLOWER, "§f" + BauSystem.MESSAGE.parse("SIMULATOR_ALIGNMENT_CENTER", player), clickType -> { // CENTER
|
||||||
if (tntSimulator != null) tntSimulator.hide(tntElement);
|
if (tntSimulator != null) tntSimulator.hide(tntElement);
|
||||||
Vector position = tntElement.getPosition();
|
Vector position = tntElement.getPosition();
|
||||||
align(position, new Vector(0.5, 0, 0.5));
|
align(position, new Vector(0.5, 0, 0.5));
|
||||||
@ -196,7 +196,7 @@ public class TNTElementGUI {
|
|||||||
|
|
||||||
Runnable editObserver = () -> {
|
Runnable editObserver = () -> {
|
||||||
// Change Count of spawned TNT
|
// Change Count of spawned TNT
|
||||||
inv.setItem(10, new SWItem(SWItem.getDye(10), plusOneName, plusOneFiveShiftLore, false, clickType -> {
|
inv.setItem(10, new SWItem(SWItem.getDye(10), "§a" + plusOneName, plusOneFiveShiftLore, false, clickType -> {
|
||||||
tntElement.setCount(tntElement.getCount() + ((clickType.isShiftClick()) ? 5 : 1));
|
tntElement.setCount(tntElement.getCount() + ((clickType.isShiftClick()) ? 5 : 1));
|
||||||
tntElement.change();
|
tntElement.change();
|
||||||
}));
|
}));
|
||||||
@ -207,13 +207,13 @@ public class TNTElementGUI {
|
|||||||
}, () -> editProperties(player, tntElement, back)));
|
}, () -> editProperties(player, tntElement, back)));
|
||||||
countItem.getItemStack().setAmount(tntElement.getCount());
|
countItem.getItemStack().setAmount(tntElement.getCount());
|
||||||
inv.setItem(19, countItem);
|
inv.setItem(19, countItem);
|
||||||
inv.setItem(28, new SWItem(SWItem.getDye(1), minusOneName, minusOneFiveShiftLore, false, clickType -> {
|
inv.setItem(28, new SWItem(SWItem.getDye(1), "§a" + minusOneName, minusOneFiveShiftLore, false, clickType -> {
|
||||||
tntElement.setCount(tntElement.getCount() - ((clickType.isShiftClick()) ? 5 : 1));
|
tntElement.setCount(tntElement.getCount() - ((clickType.isShiftClick()) ? 5 : 1));
|
||||||
tntElement.change();
|
tntElement.change();
|
||||||
}));
|
}));
|
||||||
|
|
||||||
// Change TickOffset
|
// Change TickOffset
|
||||||
inv.setItem(11, new SWItem(SWItem.getDye(10), plusOneName, plusOneFiveShiftLore, false, clickType -> {
|
inv.setItem(11, new SWItem(SWItem.getDye(10), "§b" + plusOneName, plusOneFiveShiftLore, false, clickType -> {
|
||||||
tntElement.setTickOffset(tntElement.getOwnTickOffset() + (clickType.isShiftClick() ? 5 : 1));
|
tntElement.setTickOffset(tntElement.getOwnTickOffset() + (clickType.isShiftClick() ? 5 : 1));
|
||||||
tntElement.change();
|
tntElement.change();
|
||||||
}));
|
}));
|
||||||
@ -224,13 +224,13 @@ public class TNTElementGUI {
|
|||||||
}, () -> editProperties(player, tntElement, back)));
|
}, () -> editProperties(player, tntElement, back)));
|
||||||
tickItem.getItemStack().setAmount(Math.max(tntElement.getTickOffset(), 1));
|
tickItem.getItemStack().setAmount(Math.max(tntElement.getTickOffset(), 1));
|
||||||
inv.setItem(20, tickItem);
|
inv.setItem(20, tickItem);
|
||||||
inv.setItem(29, new SWItem(SWItem.getDye(1), minusOneName, minusOneFiveShiftLore, false, clickType -> {
|
inv.setItem(29, new SWItem(SWItem.getDye(1), "§b" + minusOneName, minusOneFiveShiftLore, false, clickType -> {
|
||||||
tntElement.setTickOffset(tntElement.getOwnTickOffset() - (clickType.isShiftClick() ? 5 : 1));
|
tntElement.setTickOffset(tntElement.getOwnTickOffset() - (clickType.isShiftClick() ? 5 : 1));
|
||||||
tntElement.change();
|
tntElement.change();
|
||||||
}));
|
}));
|
||||||
|
|
||||||
// Change FuseTicks
|
// Change FuseTicks
|
||||||
inv.setItem(12, new SWItem(SWItem.getDye(10), plusOneName, plusOneFiveShiftLore, false, clickType -> {
|
inv.setItem(12, new SWItem(SWItem.getDye(10), "§c" + plusOneName, plusOneFiveShiftLore, false, clickType -> {
|
||||||
tntElement.setFuseTicks(tntElement.getFuseTicks() + (clickType.isShiftClick() ? 5 : 1));
|
tntElement.setFuseTicks(tntElement.getFuseTicks() + (clickType.isShiftClick() ? 5 : 1));
|
||||||
tntElement.change();
|
tntElement.change();
|
||||||
}));
|
}));
|
||||||
@ -241,7 +241,7 @@ public class TNTElementGUI {
|
|||||||
}, () -> editProperties(player, tntElement, back)));
|
}, () -> editProperties(player, tntElement, back)));
|
||||||
fuseTickItem.getItemStack().setAmount(Math.max(tntElement.getFuseTicks(), 1));
|
fuseTickItem.getItemStack().setAmount(Math.max(tntElement.getFuseTicks(), 1));
|
||||||
inv.setItem(21, fuseTickItem);
|
inv.setItem(21, fuseTickItem);
|
||||||
inv.setItem(30, new SWItem(SWItem.getDye(1), minusOneName, minusOneFiveShiftLore, false, clickType -> {
|
inv.setItem(30, new SWItem(SWItem.getDye(1), "§c" + minusOneName, minusOneFiveShiftLore, false, clickType -> {
|
||||||
tntElement.setFuseTicks(tntElement.getFuseTicks() - (clickType.isShiftClick() ? 5 : 1));
|
tntElement.setFuseTicks(tntElement.getFuseTicks() - (clickType.isShiftClick() ? 5 : 1));
|
||||||
tntElement.change();
|
tntElement.change();
|
||||||
}));
|
}));
|
||||||
|
@ -56,7 +56,7 @@ public class ChangePosition {
|
|||||||
List<String> lore = Arrays.asList(BauSystem.MESSAGE.parse("SIMULATOR_TNT_SPAWN_LORE", player));
|
List<String> lore = Arrays.asList(BauSystem.MESSAGE.parse("SIMULATOR_TNT_SPAWN_LORE", player));
|
||||||
|
|
||||||
// X Position
|
// X Position
|
||||||
inv.setItem(10, new SWItem(SWItem.getDye(10), plusOneName, plusOnePixelShiftLore, false, clickType -> {
|
inv.setItem(10, new SWItem(SWItem.getDye(10), "§a" + plusOneName, plusOnePixelShiftLore, false, clickType -> {
|
||||||
if (tntSimulator != null) tntSimulator.hide(simulatorElement);
|
if (tntSimulator != null) tntSimulator.hide(simulatorElement);
|
||||||
toChangeVector.get().add(clickType.isShiftClick() ? X_VECTOR : FX_VECTOR);
|
toChangeVector.get().add(clickType.isShiftClick() ? X_VECTOR : FX_VECTOR);
|
||||||
if (tntSimulator != null) tntSimulator.show(simulatorElement);
|
if (tntSimulator != null) tntSimulator.show(simulatorElement);
|
||||||
@ -71,7 +71,7 @@ public class ChangePosition {
|
|||||||
back.run();
|
back.run();
|
||||||
}, back);
|
}, back);
|
||||||
}));
|
}));
|
||||||
inv.setItem(28, new SWItem(SWItem.getDye(1), minusOneName, minusOnePixelShiftLore, false, clickType -> {
|
inv.setItem(28, new SWItem(SWItem.getDye(1), "§a" + minusOneName, minusOnePixelShiftLore, false, clickType -> {
|
||||||
if (tntSimulator != null) tntSimulator.hide(simulatorElement);
|
if (tntSimulator != null) tntSimulator.hide(simulatorElement);
|
||||||
toChangeVector.get().subtract(clickType.isShiftClick() ? X_VECTOR : FX_VECTOR);
|
toChangeVector.get().subtract(clickType.isShiftClick() ? X_VECTOR : FX_VECTOR);
|
||||||
if (tntSimulator != null) tntSimulator.show(simulatorElement);
|
if (tntSimulator != null) tntSimulator.show(simulatorElement);
|
||||||
@ -79,7 +79,7 @@ public class ChangePosition {
|
|||||||
}));
|
}));
|
||||||
|
|
||||||
// Y Position
|
// Y Position
|
||||||
inv.setItem(11, new SWItem(SWItem.getDye(10), plusOneName, plusOnePixelShiftLore, false, clickType -> {
|
inv.setItem(11, new SWItem(SWItem.getDye(10), "§b" + plusOneName, plusOnePixelShiftLore, false, clickType -> {
|
||||||
if (tntSimulator != null) tntSimulator.hide(simulatorElement);
|
if (tntSimulator != null) tntSimulator.hide(simulatorElement);
|
||||||
toChangeVector.get().add(clickType.isShiftClick() ? Y_VECTOR : FY_VECTOR);
|
toChangeVector.get().add(clickType.isShiftClick() ? Y_VECTOR : FY_VECTOR);
|
||||||
if (tntSimulator != null) tntSimulator.show(simulatorElement);
|
if (tntSimulator != null) tntSimulator.show(simulatorElement);
|
||||||
@ -94,7 +94,7 @@ public class ChangePosition {
|
|||||||
back.run();
|
back.run();
|
||||||
}, back);
|
}, back);
|
||||||
}));
|
}));
|
||||||
inv.setItem(29, new SWItem(SWItem.getDye(1), minusOneName, minusOnePixelShiftLore, false, clickType -> {
|
inv.setItem(29, new SWItem(SWItem.getDye(1), "§b" + minusOneName, minusOnePixelShiftLore, false, clickType -> {
|
||||||
if (tntSimulator != null) tntSimulator.hide(simulatorElement);
|
if (tntSimulator != null) tntSimulator.hide(simulatorElement);
|
||||||
toChangeVector.get().subtract(clickType.isShiftClick() ? Y_VECTOR : FY_VECTOR);
|
toChangeVector.get().subtract(clickType.isShiftClick() ? Y_VECTOR : FY_VECTOR);
|
||||||
if (tntSimulator != null) tntSimulator.show(simulatorElement);
|
if (tntSimulator != null) tntSimulator.show(simulatorElement);
|
||||||
@ -102,7 +102,7 @@ public class ChangePosition {
|
|||||||
}));
|
}));
|
||||||
|
|
||||||
// Z Position
|
// Z Position
|
||||||
inv.setItem(12, new SWItem(SWItem.getDye(10), plusOneName, plusOnePixelShiftLore, false, clickType -> {
|
inv.setItem(12, new SWItem(SWItem.getDye(10), "§c" + plusOneName, plusOnePixelShiftLore, false, clickType -> {
|
||||||
if (tntSimulator != null) tntSimulator.hide(simulatorElement);
|
if (tntSimulator != null) tntSimulator.hide(simulatorElement);
|
||||||
toChangeVector.get().add(clickType.isShiftClick() ? Z_VECTOR : FZ_VECTOR);
|
toChangeVector.get().add(clickType.isShiftClick() ? Z_VECTOR : FZ_VECTOR);
|
||||||
if (tntSimulator != null) tntSimulator.show(simulatorElement);
|
if (tntSimulator != null) tntSimulator.show(simulatorElement);
|
||||||
@ -117,7 +117,7 @@ public class ChangePosition {
|
|||||||
back.run();
|
back.run();
|
||||||
}, back);
|
}, back);
|
||||||
}));
|
}));
|
||||||
inv.setItem(30, new SWItem(SWItem.getDye(1), minusOneName, minusOnePixelShiftLore, false, clickType -> {
|
inv.setItem(30, new SWItem(SWItem.getDye(1), "§c" + minusOneName, minusOnePixelShiftLore, false, clickType -> {
|
||||||
if (tntSimulator != null) tntSimulator.hide(simulatorElement);
|
if (tntSimulator != null) tntSimulator.hide(simulatorElement);
|
||||||
toChangeVector.get().subtract(clickType.isShiftClick() ? Z_VECTOR : FZ_VECTOR);
|
toChangeVector.get().subtract(clickType.isShiftClick() ? Z_VECTOR : FZ_VECTOR);
|
||||||
if (tntSimulator != null) tntSimulator.show(simulatorElement);
|
if (tntSimulator != null) tntSimulator.show(simulatorElement);
|
||||||
|
In neuem Issue referenzieren
Einen Benutzer sperren