forked from SteamWar/SteamWar
Add CommonCore.DATA and CMDs
This commit is contained in:
+2
-1
@@ -23,6 +23,7 @@ import de.steamwar.bausystem.BauSystem;
|
|||||||
import de.steamwar.bausystem.features.gui.BauGUI;
|
import de.steamwar.bausystem.features.gui.BauGUI;
|
||||||
import de.steamwar.bausystem.linkage.specific.BauGuiItem;
|
import de.steamwar.bausystem.linkage.specific.BauGuiItem;
|
||||||
import de.steamwar.core.TrickyTrialsWrapper;
|
import de.steamwar.core.TrickyTrialsWrapper;
|
||||||
|
import de.steamwar.data.CMDs;
|
||||||
import de.steamwar.inventory.SWItem;
|
import de.steamwar.inventory.SWItem;
|
||||||
import de.steamwar.inventory.SWListInv;
|
import de.steamwar.inventory.SWListInv;
|
||||||
import de.steamwar.linkage.Linked;
|
import de.steamwar.linkage.Linked;
|
||||||
@@ -74,7 +75,7 @@ public class BauGuiEditor implements Listener {
|
|||||||
inv.setItem(mapping.getSize() + 5, new SWItem(Material.BARRIER, BauSystem.MESSAGE.parse("GUI_EDITOR_ITEM_TRASH", p), Arrays.asList(BauSystem.MESSAGE.parse("GUI_EDITOR_ITEM_TRASH_LORE", p)), false, clickType -> {
|
inv.setItem(mapping.getSize() + 5, new SWItem(Material.BARRIER, BauSystem.MESSAGE.parse("GUI_EDITOR_ITEM_TRASH", p), Arrays.asList(BauSystem.MESSAGE.parse("GUI_EDITOR_ITEM_TRASH_LORE", p)), false, clickType -> {
|
||||||
}).getItemStack());
|
}).getItemStack());
|
||||||
inv.setItem(mapping.getSize() + 6, new SWItem(TrickyTrialsWrapper.impl.getTurtleScute(), BauSystem.MESSAGE.parse("GUI_EDITOR_ITEM_MORE", p)).getItemStack());
|
inv.setItem(mapping.getSize() + 6, new SWItem(TrickyTrialsWrapper.impl.getTurtleScute(), BauSystem.MESSAGE.parse("GUI_EDITOR_ITEM_MORE", p)).getItemStack());
|
||||||
inv.setItem(mapping.getSize() + 8, new SWItem(Material.ARROW, BauSystem.MESSAGE.parse("GUI_EDITOR_ITEM_CLOSE", p)).setCustomModelData(1).getItemStack());
|
inv.setItem(mapping.getSize() + 8, new SWItem(Material.ARROW, BauSystem.MESSAGE.parse("GUI_EDITOR_ITEM_CLOSE", p)).setCustomModelData(CMDs.BACK).getItemStack());
|
||||||
|
|
||||||
p.openInventory(inv);
|
p.openInventory(inv);
|
||||||
p.getOpenInventory().setCursor(cursor == null ? new SWItem().getItemStack() : cursor);
|
p.getOpenInventory().setCursor(cursor == null ? new SWItem().getItemStack() : cursor);
|
||||||
|
|||||||
+3
-2
@@ -20,6 +20,7 @@
|
|||||||
package de.steamwar.bausystem.features.loader.elements;
|
package de.steamwar.bausystem.features.loader.elements;
|
||||||
|
|
||||||
import de.steamwar.bausystem.BauSystem;
|
import de.steamwar.bausystem.BauSystem;
|
||||||
|
import de.steamwar.data.CMDs;
|
||||||
import de.steamwar.inventory.SWAnvilInv;
|
import de.steamwar.inventory.SWAnvilInv;
|
||||||
import de.steamwar.inventory.SWInventory;
|
import de.steamwar.inventory.SWInventory;
|
||||||
import de.steamwar.inventory.SWItem;
|
import de.steamwar.inventory.SWItem;
|
||||||
@@ -113,7 +114,7 @@ public abstract class LoaderInteractionElement<T extends Enum<T> & LoaderSetting
|
|||||||
});
|
});
|
||||||
listInv.setItem(48, new SWItem(Material.ARROW, "§7Back", clickType -> {
|
listInv.setItem(48, new SWItem(Material.ARROW, "§7Back", clickType -> {
|
||||||
backAction.run();
|
backAction.run();
|
||||||
}).setCustomModelData(1));
|
}).setCustomModelData(CMDs.BACK));
|
||||||
listInv.setItem(50, new SWItem(Material.GHAST_SPAWN_EGG, "§7Insert another Setting", clickType -> {
|
listInv.setItem(50, new SWItem(Material.GHAST_SPAWN_EGG, "§7Insert another Setting", clickType -> {
|
||||||
elements.add(defaultSetting);
|
elements.add(defaultSetting);
|
||||||
extraPower.add(0);
|
extraPower.add(0);
|
||||||
@@ -150,7 +151,7 @@ public abstract class LoaderInteractionElement<T extends Enum<T> & LoaderSetting
|
|||||||
|
|
||||||
SWInventory swInventory = new SWInventory(player, guiSize, BauSystem.MESSAGE.parse("LOADER_GUI_SETTINGS_TITLE", player));
|
SWInventory swInventory = new SWInventory(player, guiSize, BauSystem.MESSAGE.parse("LOADER_GUI_SETTINGS_TITLE", player));
|
||||||
for (int i = guiSize - 9; i < guiSize; i++) swInventory.setItem(i, new SWItem(Material.GRAY_STAINED_GLASS_PANE, "§7", clickType -> {}));
|
for (int i = guiSize - 9; i < guiSize; i++) swInventory.setItem(i, new SWItem(Material.GRAY_STAINED_GLASS_PANE, "§7", clickType -> {}));
|
||||||
swInventory.setItem(guiSize - 9, new SWItem(Material.ARROW, BauSystem.MESSAGE.parse("LOADER_GUI_SETTINGS_BACK", player)).setCustomModelData(1).getItemStack(), clickType -> back.run());
|
swInventory.setItem(guiSize - 9, new SWItem(Material.ARROW, BauSystem.MESSAGE.parse("LOADER_GUI_SETTINGS_BACK", player)).setCustomModelData(CMDs.BACK).getItemStack(), clickType -> back.run());
|
||||||
swInventory.setItem(guiSize - 5, new SWItem(Material.WOODEN_AXE, BauSystem.MESSAGE.parse("LOADER_GUI_SETTINGS_COPY", player)).getItemStack(), clickType -> {
|
swInventory.setItem(guiSize - 5, new SWItem(Material.WOODEN_AXE, BauSystem.MESSAGE.parse("LOADER_GUI_SETTINGS_COPY", player)).getItemStack(), clickType -> {
|
||||||
SWAnvilInv swAnvilInv = new SWAnvilInv(player, BauSystem.MESSAGE.parse("LOADER_GUI_COPY_TITLE", player), "1");
|
SWAnvilInv swAnvilInv = new SWAnvilInv(player, BauSystem.MESSAGE.parse("LOADER_GUI_COPY_TITLE", player), "1");
|
||||||
swAnvilInv.setCallback(s -> {
|
swAnvilInv.setCallback(s -> {
|
||||||
|
|||||||
+2
-1
@@ -21,6 +21,7 @@ package de.steamwar.bausystem.features.loader.elements.impl;
|
|||||||
|
|
||||||
import de.steamwar.bausystem.BauSystem;
|
import de.steamwar.bausystem.BauSystem;
|
||||||
import de.steamwar.bausystem.features.loader.elements.LoaderElement;
|
import de.steamwar.bausystem.features.loader.elements.LoaderElement;
|
||||||
|
import de.steamwar.data.CMDs;
|
||||||
import de.steamwar.inventory.SWAnvilInv;
|
import de.steamwar.inventory.SWAnvilInv;
|
||||||
import de.steamwar.inventory.SWInventory;
|
import de.steamwar.inventory.SWInventory;
|
||||||
import de.steamwar.inventory.SWItem;
|
import de.steamwar.inventory.SWItem;
|
||||||
@@ -60,7 +61,7 @@ public class LoaderWait implements LoaderElement {
|
|||||||
public void click(Player player, Runnable backAction) {
|
public void click(Player player, Runnable backAction) {
|
||||||
SWInventory swInventory = new SWInventory(player, 18, BauSystem.MESSAGE.parse("LOADER_GUI_WAIT_TITLE", player));
|
SWInventory swInventory = new SWInventory(player, 18, BauSystem.MESSAGE.parse("LOADER_GUI_WAIT_TITLE", player));
|
||||||
for (int i = 9; i < 18; i++) swInventory.setItem(i, new SWItem(Material.GRAY_STAINED_GLASS_PANE, "§7"));
|
for (int i = 9; i < 18; i++) swInventory.setItem(i, new SWItem(Material.GRAY_STAINED_GLASS_PANE, "§7"));
|
||||||
swInventory.setItem(9, new SWItem(Material.ARROW, BauSystem.MESSAGE.parse("LOADER_GUI_WAIT_BACK", player)).setCustomModelData(1).getItemStack(), clickType -> backAction.run());
|
swInventory.setItem(9, new SWItem(Material.ARROW, BauSystem.MESSAGE.parse("LOADER_GUI_WAIT_BACK", player)).setCustomModelData(CMDs.BACK).getItemStack(), clickType -> backAction.run());
|
||||||
|
|
||||||
swInventory.setItem(3, new SWItem(SWItem.getDye(1), BauSystem.MESSAGE.parse("LOADER_SETTING_TICKS_REMOVE_ONE", player), Arrays.asList(BauSystem.MESSAGE.parse("LOADER_SETTING_TICKS_REMOVE_ONE_SHIFT", player)), false, clickType -> {}).getItemStack(), clickType -> {
|
swInventory.setItem(3, new SWItem(SWItem.getDye(1), BauSystem.MESSAGE.parse("LOADER_SETTING_TICKS_REMOVE_ONE", player), Arrays.asList(BauSystem.MESSAGE.parse("LOADER_SETTING_TICKS_REMOVE_ONE_SHIFT", player)), false, clickType -> {}).getItemStack(), clickType -> {
|
||||||
delay -= clickType.isShiftClick() ? 5 : 1;
|
delay -= clickType.isShiftClick() ? 5 : 1;
|
||||||
|
|||||||
+2
-1
@@ -25,6 +25,7 @@ import de.steamwar.bausystem.features.simulator.data.SimulatorElement;
|
|||||||
import de.steamwar.bausystem.features.simulator.data.SimulatorGroup;
|
import de.steamwar.bausystem.features.simulator.data.SimulatorGroup;
|
||||||
import de.steamwar.bausystem.features.simulator.gui.base.SimulatorBaseGui;
|
import de.steamwar.bausystem.features.simulator.gui.base.SimulatorBaseGui;
|
||||||
import de.steamwar.bausystem.features.simulator.gui.base.SimulatorPageGui;
|
import de.steamwar.bausystem.features.simulator.gui.base.SimulatorPageGui;
|
||||||
|
import de.steamwar.data.CMDs;
|
||||||
import de.steamwar.inventory.SWItem;
|
import de.steamwar.inventory.SWItem;
|
||||||
import org.bukkit.Material;
|
import org.bukkit.Material;
|
||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
@@ -70,7 +71,7 @@ public class SimulatorGroupGui extends SimulatorPageGui<SimulatorElement<?>> {
|
|||||||
|
|
||||||
inventory.setItem(0, new SWItem(Material.ARROW, "§eBack", clickType -> {
|
inventory.setItem(0, new SWItem(Material.ARROW, "§eBack", clickType -> {
|
||||||
back.open();
|
back.open();
|
||||||
}).setCustomModelData(1));
|
}).setCustomModelData(CMDs.BACK));
|
||||||
|
|
||||||
inventory.setItem(8, new SWItem(Material.BARRIER, "§eDelete", clickType -> {
|
inventory.setItem(8, new SWItem(Material.BARRIER, "§eDelete", clickType -> {
|
||||||
simulatorGroup.getElements().clear();
|
simulatorGroup.getElements().clear();
|
||||||
|
|||||||
+2
-1
@@ -25,6 +25,7 @@ import de.steamwar.bausystem.features.simulator.data.SimulatorGroup;
|
|||||||
import de.steamwar.bausystem.features.simulator.data.tnt.TNTElement;
|
import de.steamwar.bausystem.features.simulator.data.tnt.TNTElement;
|
||||||
import de.steamwar.bausystem.features.simulator.gui.base.SimulatorAnvilGui;
|
import de.steamwar.bausystem.features.simulator.gui.base.SimulatorAnvilGui;
|
||||||
import de.steamwar.bausystem.features.simulator.gui.base.SimulatorBaseGui;
|
import de.steamwar.bausystem.features.simulator.gui.base.SimulatorBaseGui;
|
||||||
|
import de.steamwar.data.CMDs;
|
||||||
import de.steamwar.inventory.SWItem;
|
import de.steamwar.inventory.SWItem;
|
||||||
import org.bukkit.Material;
|
import org.bukkit.Material;
|
||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
@@ -58,7 +59,7 @@ public class SimulatorGroupSettingsGui extends SimulatorBaseGui {
|
|||||||
// Back Arrow
|
// Back Arrow
|
||||||
inventory.setItem(0, new SWItem(Material.ARROW, "§eBack", clickType -> {
|
inventory.setItem(0, new SWItem(Material.ARROW, "§eBack", clickType -> {
|
||||||
back.open();
|
back.open();
|
||||||
}).setCustomModelData(1));
|
}).setCustomModelData(CMDs.BACK));
|
||||||
|
|
||||||
// Material Chooser
|
// Material Chooser
|
||||||
inventory.setItem(4, simulatorGroup.toItem(player, clickType -> {
|
inventory.setItem(4, simulatorGroup.toItem(player, clickType -> {
|
||||||
|
|||||||
+2
-1
@@ -23,6 +23,7 @@ import de.steamwar.bausystem.features.simulator.SimulatorWatcher;
|
|||||||
import de.steamwar.bausystem.features.simulator.data.Simulator;
|
import de.steamwar.bausystem.features.simulator.data.Simulator;
|
||||||
import de.steamwar.bausystem.features.simulator.gui.base.SimulatorBaseGui;
|
import de.steamwar.bausystem.features.simulator.gui.base.SimulatorBaseGui;
|
||||||
import de.steamwar.bausystem.features.simulator.gui.base.SimulatorPageGui;
|
import de.steamwar.bausystem.features.simulator.gui.base.SimulatorPageGui;
|
||||||
|
import de.steamwar.data.CMDs;
|
||||||
import de.steamwar.inventory.SWItem;
|
import de.steamwar.inventory.SWItem;
|
||||||
import org.bukkit.Material;
|
import org.bukkit.Material;
|
||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
@@ -75,7 +76,7 @@ public class SimulatorMaterialGui extends SimulatorPageGui<Material> {
|
|||||||
}));
|
}));
|
||||||
inventory.setItem(0, new SWItem(Material.ARROW, "§eBack", clickType -> {
|
inventory.setItem(0, new SWItem(Material.ARROW, "§eBack", clickType -> {
|
||||||
back.open();
|
back.open();
|
||||||
}).setCustomModelData(1));
|
}).setCustomModelData(CMDs.BACK));
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
+2
-1
@@ -26,6 +26,7 @@ import de.steamwar.bausystem.features.simulator.data.observer.ObserverElement;
|
|||||||
import de.steamwar.bausystem.features.simulator.data.observer.ObserverPhase;
|
import de.steamwar.bausystem.features.simulator.data.observer.ObserverPhase;
|
||||||
import de.steamwar.bausystem.features.simulator.gui.base.SimulatorBaseGui;
|
import de.steamwar.bausystem.features.simulator.gui.base.SimulatorBaseGui;
|
||||||
import de.steamwar.bausystem.features.simulator.gui.base.SimulatorScrollGui;
|
import de.steamwar.bausystem.features.simulator.gui.base.SimulatorScrollGui;
|
||||||
|
import de.steamwar.data.CMDs;
|
||||||
import de.steamwar.inventory.SWItem;
|
import de.steamwar.inventory.SWItem;
|
||||||
import org.bukkit.Material;
|
import org.bukkit.Material;
|
||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
@@ -82,7 +83,7 @@ public class SimulatorObserverGui extends SimulatorScrollGui<ObserverPhase> {
|
|||||||
new SimulatorGroupGui(player, simulator, newParent, simulatorGui).open();
|
new SimulatorGroupGui(player, simulator, newParent, simulatorGui).open();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}).setCustomModelData(1));
|
}).setCustomModelData(CMDs.BACK));
|
||||||
|
|
||||||
inventory.setItem(8, new SWItem(Material.BARRIER, "§eDelete", clickType -> {
|
inventory.setItem(8, new SWItem(Material.BARRIER, "§eDelete", clickType -> {
|
||||||
observer.getPhases().clear();
|
observer.getPhases().clear();
|
||||||
|
|||||||
+2
-1
@@ -27,6 +27,7 @@ import de.steamwar.bausystem.features.simulator.data.observer.ObserverPhase;
|
|||||||
import de.steamwar.bausystem.features.simulator.gui.base.SimulatorAnvilGui;
|
import de.steamwar.bausystem.features.simulator.gui.base.SimulatorAnvilGui;
|
||||||
import de.steamwar.bausystem.features.simulator.gui.base.SimulatorBaseGui;
|
import de.steamwar.bausystem.features.simulator.gui.base.SimulatorBaseGui;
|
||||||
import de.steamwar.core.Core;
|
import de.steamwar.core.Core;
|
||||||
|
import de.steamwar.data.CMDs;
|
||||||
import de.steamwar.inventory.SWItem;
|
import de.steamwar.inventory.SWItem;
|
||||||
import org.bukkit.Material;
|
import org.bukkit.Material;
|
||||||
import org.bukkit.block.BlockFace;
|
import org.bukkit.block.BlockFace;
|
||||||
@@ -62,7 +63,7 @@ public class SimulatorObserverPhaseSettingsGui extends SimulatorBaseGui {
|
|||||||
// Back Arrow
|
// Back Arrow
|
||||||
inventory.setItem(0, new SWItem(Material.ARROW, "§eBack", clickType -> {
|
inventory.setItem(0, new SWItem(Material.ARROW, "§eBack", clickType -> {
|
||||||
back.open();
|
back.open();
|
||||||
}).setCustomModelData(1));
|
}).setCustomModelData(CMDs.BACK));
|
||||||
|
|
||||||
// Material Chooser
|
// Material Chooser
|
||||||
inventory.setItem(4, observerElement.toItem(player, clickType -> {
|
inventory.setItem(4, observerElement.toItem(player, clickType -> {
|
||||||
|
|||||||
+2
-1
@@ -24,6 +24,7 @@ import de.steamwar.bausystem.features.simulator.data.Simulator;
|
|||||||
import de.steamwar.bausystem.features.simulator.data.observer.ObserverElement;
|
import de.steamwar.bausystem.features.simulator.data.observer.ObserverElement;
|
||||||
import de.steamwar.bausystem.features.simulator.gui.base.SimulatorAnvilGui;
|
import de.steamwar.bausystem.features.simulator.gui.base.SimulatorAnvilGui;
|
||||||
import de.steamwar.bausystem.features.simulator.gui.base.SimulatorBaseGui;
|
import de.steamwar.bausystem.features.simulator.gui.base.SimulatorBaseGui;
|
||||||
|
import de.steamwar.data.CMDs;
|
||||||
import de.steamwar.inventory.SWItem;
|
import de.steamwar.inventory.SWItem;
|
||||||
import org.bukkit.Material;
|
import org.bukkit.Material;
|
||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
@@ -56,7 +57,7 @@ public class SimulatorObserverSettingsGui extends SimulatorBaseGui {
|
|||||||
// Back Arrow
|
// Back Arrow
|
||||||
inventory.setItem(0, new SWItem(Material.ARROW, "§eBack", clickType -> {
|
inventory.setItem(0, new SWItem(Material.ARROW, "§eBack", clickType -> {
|
||||||
back.open();
|
back.open();
|
||||||
}).setCustomModelData(1));
|
}).setCustomModelData(CMDs.BACK));
|
||||||
|
|
||||||
// Material Chooser
|
// Material Chooser
|
||||||
inventory.setItem(4, observer.toItem(player, clickType -> {
|
inventory.setItem(4, observer.toItem(player, clickType -> {
|
||||||
|
|||||||
+2
-1
@@ -26,6 +26,7 @@ import de.steamwar.bausystem.features.simulator.data.redstone.RedstoneElement;
|
|||||||
import de.steamwar.bausystem.features.simulator.data.redstone.RedstonePhase;
|
import de.steamwar.bausystem.features.simulator.data.redstone.RedstonePhase;
|
||||||
import de.steamwar.bausystem.features.simulator.gui.base.SimulatorBaseGui;
|
import de.steamwar.bausystem.features.simulator.gui.base.SimulatorBaseGui;
|
||||||
import de.steamwar.bausystem.features.simulator.gui.base.SimulatorScrollGui;
|
import de.steamwar.bausystem.features.simulator.gui.base.SimulatorScrollGui;
|
||||||
|
import de.steamwar.data.CMDs;
|
||||||
import de.steamwar.inventory.SWItem;
|
import de.steamwar.inventory.SWItem;
|
||||||
import lombok.AllArgsConstructor;
|
import lombok.AllArgsConstructor;
|
||||||
import org.bukkit.Material;
|
import org.bukkit.Material;
|
||||||
@@ -88,7 +89,7 @@ public class SimulatorRedstoneGui extends SimulatorScrollGui<SimulatorRedstoneGu
|
|||||||
new SimulatorGroupGui(player, simulator, newParent, simulatorGui).open();
|
new SimulatorGroupGui(player, simulator, newParent, simulatorGui).open();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}).setCustomModelData(1));
|
}).setCustomModelData(CMDs.BACK));
|
||||||
|
|
||||||
inventory.setItem(8, new SWItem(Material.BARRIER, "§eDelete", clickType -> {
|
inventory.setItem(8, new SWItem(Material.BARRIER, "§eDelete", clickType -> {
|
||||||
redstone.getPhases().clear();
|
redstone.getPhases().clear();
|
||||||
|
|||||||
+2
-1
@@ -27,6 +27,7 @@ import de.steamwar.bausystem.features.simulator.data.redstone.RedstonePhase;
|
|||||||
import de.steamwar.bausystem.features.simulator.gui.base.SimulatorAnvilGui;
|
import de.steamwar.bausystem.features.simulator.gui.base.SimulatorAnvilGui;
|
||||||
import de.steamwar.bausystem.features.simulator.gui.base.SimulatorBaseGui;
|
import de.steamwar.bausystem.features.simulator.gui.base.SimulatorBaseGui;
|
||||||
import de.steamwar.core.Core;
|
import de.steamwar.core.Core;
|
||||||
|
import de.steamwar.data.CMDs;
|
||||||
import de.steamwar.inventory.SWItem;
|
import de.steamwar.inventory.SWItem;
|
||||||
import org.bukkit.Material;
|
import org.bukkit.Material;
|
||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
@@ -60,7 +61,7 @@ public class SimulatorRedstonePhaseSettingsGui extends SimulatorBaseGui {
|
|||||||
// Back Arrow
|
// Back Arrow
|
||||||
inventory.setItem(0, new SWItem(Material.ARROW, "§eBack", clickType -> {
|
inventory.setItem(0, new SWItem(Material.ARROW, "§eBack", clickType -> {
|
||||||
back.open();
|
back.open();
|
||||||
}).setCustomModelData(1));
|
}).setCustomModelData(CMDs.BACK));
|
||||||
|
|
||||||
// Material Chooser
|
// Material Chooser
|
||||||
inventory.setItem(4, redstoneElement.toItem(player, clickType -> {
|
inventory.setItem(4, redstoneElement.toItem(player, clickType -> {
|
||||||
|
|||||||
+2
-1
@@ -24,6 +24,7 @@ import de.steamwar.bausystem.features.simulator.data.Simulator;
|
|||||||
import de.steamwar.bausystem.features.simulator.data.redstone.RedstoneElement;
|
import de.steamwar.bausystem.features.simulator.data.redstone.RedstoneElement;
|
||||||
import de.steamwar.bausystem.features.simulator.gui.base.SimulatorAnvilGui;
|
import de.steamwar.bausystem.features.simulator.gui.base.SimulatorAnvilGui;
|
||||||
import de.steamwar.bausystem.features.simulator.gui.base.SimulatorBaseGui;
|
import de.steamwar.bausystem.features.simulator.gui.base.SimulatorBaseGui;
|
||||||
|
import de.steamwar.data.CMDs;
|
||||||
import de.steamwar.inventory.SWItem;
|
import de.steamwar.inventory.SWItem;
|
||||||
import org.bukkit.Material;
|
import org.bukkit.Material;
|
||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
@@ -55,7 +56,7 @@ public class SimulatorRedstoneSettingsGui extends SimulatorBaseGui {
|
|||||||
// Back Arrow
|
// Back Arrow
|
||||||
inventory.setItem(0, new SWItem(Material.ARROW, "§eBack", clickType -> {
|
inventory.setItem(0, new SWItem(Material.ARROW, "§eBack", clickType -> {
|
||||||
back.open();
|
back.open();
|
||||||
}).setCustomModelData(1));
|
}).setCustomModelData(CMDs.BACK));
|
||||||
|
|
||||||
// Material Chooser
|
// Material Chooser
|
||||||
inventory.setItem(4, redstone.toItem(player, clickType -> {
|
inventory.setItem(4, redstone.toItem(player, clickType -> {
|
||||||
|
|||||||
+2
-1
@@ -22,6 +22,7 @@ package de.steamwar.bausystem.features.simulator.gui;
|
|||||||
import de.steamwar.bausystem.features.simulator.SimulatorWatcher;
|
import de.steamwar.bausystem.features.simulator.SimulatorWatcher;
|
||||||
import de.steamwar.bausystem.features.simulator.data.Simulator;
|
import de.steamwar.bausystem.features.simulator.data.Simulator;
|
||||||
import de.steamwar.bausystem.features.simulator.gui.base.SimulatorBaseGui;
|
import de.steamwar.bausystem.features.simulator.gui.base.SimulatorBaseGui;
|
||||||
|
import de.steamwar.data.CMDs;
|
||||||
import de.steamwar.inventory.SWItem;
|
import de.steamwar.inventory.SWItem;
|
||||||
import org.bukkit.Material;
|
import org.bukkit.Material;
|
||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
@@ -47,7 +48,7 @@ public class SimulatorSettingsGui extends SimulatorBaseGui {
|
|||||||
// Back Arrow
|
// Back Arrow
|
||||||
inventory.setItem(0, new SWItem(Material.ARROW, "§eBack", clickType -> {
|
inventory.setItem(0, new SWItem(Material.ARROW, "§eBack", clickType -> {
|
||||||
back.open();
|
back.open();
|
||||||
}).setCustomModelData(1));
|
}).setCustomModelData(CMDs.BACK));
|
||||||
|
|
||||||
// Material Chooser
|
// Material Chooser
|
||||||
inventory.setItem(4, simulator.toItem(player, clickType -> {
|
inventory.setItem(4, simulator.toItem(player, clickType -> {
|
||||||
|
|||||||
+2
-1
@@ -29,6 +29,7 @@ import de.steamwar.bausystem.features.simulator.gui.base.SimulatorAnvilGui;
|
|||||||
import de.steamwar.bausystem.features.simulator.gui.base.SimulatorBaseGui;
|
import de.steamwar.bausystem.features.simulator.gui.base.SimulatorBaseGui;
|
||||||
import de.steamwar.bausystem.features.simulator.gui.base.SimulatorScrollGui;
|
import de.steamwar.bausystem.features.simulator.gui.base.SimulatorScrollGui;
|
||||||
import de.steamwar.bausystem.region.Region;
|
import de.steamwar.bausystem.region.Region;
|
||||||
|
import de.steamwar.data.CMDs;
|
||||||
import de.steamwar.inventory.SWItem;
|
import de.steamwar.inventory.SWItem;
|
||||||
import org.bukkit.Material;
|
import org.bukkit.Material;
|
||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
@@ -81,7 +82,7 @@ public class SimulatorTNTGui extends SimulatorScrollGui<TNTPhase> {
|
|||||||
new SimulatorGroupGui(player, simulator, newParent, simulatorGui).open();
|
new SimulatorGroupGui(player, simulator, newParent, simulatorGui).open();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}).setCustomModelData(1));
|
}).setCustomModelData(CMDs.BACK));
|
||||||
|
|
||||||
inventory.setItem(8, new SWItem(Material.BARRIER, "§eDelete", clickType -> {
|
inventory.setItem(8, new SWItem(Material.BARRIER, "§eDelete", clickType -> {
|
||||||
tnt.getPhases().clear();
|
tnt.getPhases().clear();
|
||||||
|
|||||||
+2
-1
@@ -27,6 +27,7 @@ import de.steamwar.bausystem.features.simulator.data.tnt.TNTPhase;
|
|||||||
import de.steamwar.bausystem.features.simulator.gui.base.SimulatorAnvilGui;
|
import de.steamwar.bausystem.features.simulator.gui.base.SimulatorAnvilGui;
|
||||||
import de.steamwar.bausystem.features.simulator.gui.base.SimulatorBaseGui;
|
import de.steamwar.bausystem.features.simulator.gui.base.SimulatorBaseGui;
|
||||||
import de.steamwar.core.Core;
|
import de.steamwar.core.Core;
|
||||||
|
import de.steamwar.data.CMDs;
|
||||||
import de.steamwar.inventory.SWItem;
|
import de.steamwar.inventory.SWItem;
|
||||||
import org.bukkit.Material;
|
import org.bukkit.Material;
|
||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
@@ -60,7 +61,7 @@ public class SimulatorTNTPhaseSettingsGui extends SimulatorBaseGui {
|
|||||||
// Back Arrow
|
// Back Arrow
|
||||||
inventory.setItem(0, new SWItem(Material.ARROW, "§eBack", clickType -> {
|
inventory.setItem(0, new SWItem(Material.ARROW, "§eBack", clickType -> {
|
||||||
back.open();
|
back.open();
|
||||||
}).setCustomModelData(1));
|
}).setCustomModelData(CMDs.BACK));
|
||||||
|
|
||||||
// Material Chooser
|
// Material Chooser
|
||||||
inventory.setItem(4, tntElement.toItem(player, clickType -> {
|
inventory.setItem(4, tntElement.toItem(player, clickType -> {
|
||||||
|
|||||||
+2
-1
@@ -24,6 +24,7 @@ import de.steamwar.bausystem.features.simulator.data.Simulator;
|
|||||||
import de.steamwar.bausystem.features.simulator.data.tnt.TNTElement;
|
import de.steamwar.bausystem.features.simulator.data.tnt.TNTElement;
|
||||||
import de.steamwar.bausystem.features.simulator.gui.base.SimulatorAnvilGui;
|
import de.steamwar.bausystem.features.simulator.gui.base.SimulatorAnvilGui;
|
||||||
import de.steamwar.bausystem.features.simulator.gui.base.SimulatorBaseGui;
|
import de.steamwar.bausystem.features.simulator.gui.base.SimulatorBaseGui;
|
||||||
|
import de.steamwar.data.CMDs;
|
||||||
import de.steamwar.inventory.SWItem;
|
import de.steamwar.inventory.SWItem;
|
||||||
import org.bukkit.Material;
|
import org.bukkit.Material;
|
||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
@@ -58,7 +59,7 @@ public class SimulatorTNTSettingsGui extends SimulatorBaseGui {
|
|||||||
// Back Arrow
|
// Back Arrow
|
||||||
inventory.setItem(0, new SWItem(Material.ARROW, "§eBack", clickType -> {
|
inventory.setItem(0, new SWItem(Material.ARROW, "§eBack", clickType -> {
|
||||||
back.open();
|
back.open();
|
||||||
}).setCustomModelData(1));
|
}).setCustomModelData(CMDs.BACK));
|
||||||
|
|
||||||
// Material Chooser
|
// Material Chooser
|
||||||
List<String> lore = new ArrayList<>();
|
List<String> lore = new ArrayList<>();
|
||||||
|
|||||||
+2
-1
@@ -21,6 +21,7 @@ package de.steamwar.bausystem.features.slaves.laufbau;
|
|||||||
|
|
||||||
import de.steamwar.bausystem.BauSystem;
|
import de.steamwar.bausystem.BauSystem;
|
||||||
import de.steamwar.bausystem.shared.Pair;
|
import de.steamwar.bausystem.shared.Pair;
|
||||||
|
import de.steamwar.data.CMDs;
|
||||||
import de.steamwar.inventory.SWItem;
|
import de.steamwar.inventory.SWItem;
|
||||||
import de.steamwar.inventory.SWListInv;
|
import de.steamwar.inventory.SWListInv;
|
||||||
import org.bukkit.Material;
|
import org.bukkit.Material;
|
||||||
@@ -91,7 +92,7 @@ public class LaufbauSettings {
|
|||||||
});
|
});
|
||||||
inv.setItem(49, new SWItem(Material.ARROW, BauSystem.MESSAGE.parse("LAUFBAU_SETTINGS_GUI_BACK", p), clickType -> {
|
inv.setItem(49, new SWItem(Material.ARROW, BauSystem.MESSAGE.parse("LAUFBAU_SETTINGS_GUI_BACK", p), clickType -> {
|
||||||
open();
|
open();
|
||||||
}).setCustomModelData(1));
|
}).setCustomModelData(CMDs.BACK));
|
||||||
inv.open();
|
inv.open();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+2
-1
@@ -26,6 +26,7 @@ import de.steamwar.bausystem.shared.EnumDisplay;
|
|||||||
import de.steamwar.command.PreviousArguments;
|
import de.steamwar.command.PreviousArguments;
|
||||||
import de.steamwar.command.SWCommand;
|
import de.steamwar.command.SWCommand;
|
||||||
import de.steamwar.command.TypeMapper;
|
import de.steamwar.command.TypeMapper;
|
||||||
|
import de.steamwar.data.CMDs;
|
||||||
import de.steamwar.inventory.SWAnvilInv;
|
import de.steamwar.inventory.SWAnvilInv;
|
||||||
import de.steamwar.inventory.SWInventory;
|
import de.steamwar.inventory.SWInventory;
|
||||||
import de.steamwar.inventory.SWItem;
|
import de.steamwar.inventory.SWItem;
|
||||||
@@ -204,7 +205,7 @@ public class MaterialCommand extends SWCommand implements Listener {
|
|||||||
Search search = searchMap.get(p);
|
Search search = searchMap.get(p);
|
||||||
swInventory.setItem(0, new SWItem(Material.ARROW, BauSystem.MESSAGE.parse("MATERIAL_BACK", p), clickType -> {
|
swInventory.setItem(0, new SWItem(Material.ARROW, BauSystem.MESSAGE.parse("MATERIAL_BACK", p), clickType -> {
|
||||||
materialGUI(p);
|
materialGUI(p);
|
||||||
}).setCustomModelData(1));
|
}).setCustomModelData(CMDs.BACK));
|
||||||
swInventory.setItem(10, new SWItem(Material.NAME_TAG, BauSystem.MESSAGE.parse("MATERIAL_SEARCH_NAME", p) + BauSystem.MESSAGE.parse("MATERIAL_SEARCH_VALUE", p, search.name), clickType -> {
|
swInventory.setItem(10, new SWItem(Material.NAME_TAG, BauSystem.MESSAGE.parse("MATERIAL_SEARCH_NAME", p) + BauSystem.MESSAGE.parse("MATERIAL_SEARCH_VALUE", p, search.name), clickType -> {
|
||||||
SWAnvilInv swAnvilInv = new SWAnvilInv(p, BauSystem.MESSAGE.parse("MATERIAL_SEARCH_NAME", p), search.name);
|
SWAnvilInv swAnvilInv = new SWAnvilInv(p, BauSystem.MESSAGE.parse("MATERIAL_SEARCH_NAME", p), search.name);
|
||||||
swAnvilInv.setCallback(s -> {
|
swAnvilInv.setCallback(s -> {
|
||||||
|
|||||||
@@ -0,0 +1,25 @@
|
|||||||
|
/*
|
||||||
|
* This file is a part of the SteamWar software.
|
||||||
|
*
|
||||||
|
* Copyright (C) 2024 SteamWar.de-Serverteam
|
||||||
|
*
|
||||||
|
* This program is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU Affero General Public License as published by
|
||||||
|
* the Free Software Foundation, either version 3 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU Affero General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU Affero General Public License
|
||||||
|
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
|
||||||
|
plugins {
|
||||||
|
steamwar.java
|
||||||
|
}
|
||||||
|
|
||||||
|
dependencies {
|
||||||
|
}
|
||||||
@@ -0,0 +1,36 @@
|
|||||||
|
/*
|
||||||
|
* This file is a part of the SteamWar software.
|
||||||
|
*
|
||||||
|
* Copyright (C) 2020 SteamWar.de-Serverteam
|
||||||
|
*
|
||||||
|
* This program is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU Affero General Public License as published by
|
||||||
|
* the Free Software Foundation, either version 3 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU Affero General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU Affero General Public License
|
||||||
|
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
|
||||||
|
package de.steamwar.data;
|
||||||
|
|
||||||
|
// Custom Model Data Constants
|
||||||
|
public interface CMDs {
|
||||||
|
|
||||||
|
// Material.ARROW
|
||||||
|
int BACK = 1;
|
||||||
|
|
||||||
|
// Material.BARRIER
|
||||||
|
int SIMULATOR_DELETE = 1;
|
||||||
|
|
||||||
|
// Material.REPEATER
|
||||||
|
int SIMULATOR_SETTINGS = 1;
|
||||||
|
|
||||||
|
// Material.ENDER_PEARL and Material.ENDER_EYE
|
||||||
|
int SIMULATOR_ENABLED_OR_DISABLED = 1;
|
||||||
|
}
|
||||||
@@ -24,4 +24,5 @@ plugins {
|
|||||||
dependencies {
|
dependencies {
|
||||||
api(project(":CommonCore:SQL"))
|
api(project(":CommonCore:SQL"))
|
||||||
api(project(":CommonCore:Network"))
|
api(project(":CommonCore:Network"))
|
||||||
|
api(project(":CommonCore:Data"))
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -24,6 +24,7 @@ import com.google.gson.JsonObject;
|
|||||||
import com.google.gson.internal.Streams;
|
import com.google.gson.internal.Streams;
|
||||||
import com.google.gson.stream.JsonReader;
|
import com.google.gson.stream.JsonReader;
|
||||||
import de.steamwar.core.Core;
|
import de.steamwar.core.Core;
|
||||||
|
import de.steamwar.data.CMDs;
|
||||||
import de.steamwar.sql.*;
|
import de.steamwar.sql.*;
|
||||||
import lombok.*;
|
import lombok.*;
|
||||||
import org.bukkit.Bukkit;
|
import org.bukkit.Bukkit;
|
||||||
@@ -113,7 +114,7 @@ public class SchematicSelector {
|
|||||||
List<SWListInv.SWListEntry<SchematicNode>> list = new ArrayList<>();
|
List<SWListInv.SWListEntry<SchematicNode>> list = new ArrayList<>();
|
||||||
|
|
||||||
if(depth != 0) {
|
if(depth != 0) {
|
||||||
list.add(new SWListInv.SWListEntry<>(new SWItem(Material.ARROW, Core.MESSAGE.parse("SCHEM_SELECTOR_BACK", player), clickType -> {}).setCustomModelData(1), null));
|
list.add(new SWListInv.SWListEntry<>(new SWItem(Material.ARROW, Core.MESSAGE.parse("SCHEM_SELECTOR_BACK", player), clickType -> {}).setCustomModelData(CMDs.BACK), null));
|
||||||
}
|
}
|
||||||
|
|
||||||
for (SchematicNode node : nodes) {
|
for (SchematicNode node : nodes) {
|
||||||
|
|||||||
@@ -20,6 +20,7 @@
|
|||||||
package de.steamwar.teamserver.command;
|
package de.steamwar.teamserver.command;
|
||||||
|
|
||||||
import de.steamwar.command.SWCommand;
|
import de.steamwar.command.SWCommand;
|
||||||
|
import de.steamwar.data.CMDs;
|
||||||
import de.steamwar.inventory.SWAnvilInv;
|
import de.steamwar.inventory.SWAnvilInv;
|
||||||
import de.steamwar.inventory.SWInventory;
|
import de.steamwar.inventory.SWInventory;
|
||||||
import de.steamwar.inventory.SWItem;
|
import de.steamwar.inventory.SWItem;
|
||||||
@@ -208,7 +209,7 @@ public class MaterialCommand extends SWCommand implements Listener {
|
|||||||
Search search = searchMap.get(p);
|
Search search = searchMap.get(p);
|
||||||
swInventory.setItem(0, new SWItem(Material.ARROW, Builder.MESSAGE.parse("MATERIAL_BACK", p), clickType -> {
|
swInventory.setItem(0, new SWItem(Material.ARROW, Builder.MESSAGE.parse("MATERIAL_BACK", p), clickType -> {
|
||||||
materialGUI(p);
|
materialGUI(p);
|
||||||
}).setCustomModelData(1));
|
}).setCustomModelData(CMDs.BACK));
|
||||||
swInventory.setItem(10, new SWItem(Material.NAME_TAG, Builder.MESSAGE.parse("MATERIAL_SEARCH_NAME", p) + Builder.MESSAGE.parse("MATERIAL_SEARCH_VALUE", p, search.name), clickType -> {
|
swInventory.setItem(10, new SWItem(Material.NAME_TAG, Builder.MESSAGE.parse("MATERIAL_SEARCH_NAME", p) + Builder.MESSAGE.parse("MATERIAL_SEARCH_VALUE", p, search.name), clickType -> {
|
||||||
SWAnvilInv swAnvilInv = new SWAnvilInv(p, Builder.MESSAGE.parse("MATERIAL_SEARCH_NAME", p), search.name);
|
SWAnvilInv swAnvilInv = new SWAnvilInv(p, Builder.MESSAGE.parse("MATERIAL_SEARCH_NAME", p), search.name);
|
||||||
swAnvilInv.setCallback(s -> {
|
swAnvilInv.setCallback(s -> {
|
||||||
|
|||||||
@@ -184,6 +184,7 @@ include("CommandFramework")
|
|||||||
|
|
||||||
include(
|
include(
|
||||||
"CommonCore",
|
"CommonCore",
|
||||||
|
"CommonCore:Data",
|
||||||
"CommonCore:SQL",
|
"CommonCore:SQL",
|
||||||
"CommonCore:Network"
|
"CommonCore:Network"
|
||||||
)
|
)
|
||||||
|
|||||||
Reference in New Issue
Block a user