diff --git a/BauSystem_Main/src/de/steamwar/bausystem/configplayer/ConfigCreator.java b/BauSystem_Main/src/de/steamwar/bausystem/configplayer/ConfigCreator.java index 8dc88ad1..8d22bb0e 100644 --- a/BauSystem_Main/src/de/steamwar/bausystem/configplayer/ConfigCreator.java +++ b/BauSystem_Main/src/de/steamwar/bausystem/configplayer/ConfigCreator.java @@ -25,7 +25,7 @@ public class ConfigCreator { // 9: 5 | 10: ? | 11: ? | 12: ? | 13: ? | 14: ? | 15: ? | 16: ? | 17: 16 // 18: 4 | 19: ? | 20: 19 | 21: 21 | 22: 9 | 23: 0 | 24: 1 | 25: ? | 26: 11 // 27: 6 | 28: ? | 29: ? | 30: ? | 31: ? | 32: ? | 33: ? | 34: ? | 35: 18 - // 36: ? | 37: 23 | 38: 20 | 39: 8 | 40: 22 | 41: ? | 42: 12 | 43: 14 | 44: ? + // 36: ? | 37: 23 | 38: 20 | 39: 8 | 40: 22 | 41: 26 | 42: 12 | 43: 14 | 44: ? yapionObject.add("2", 10); yapionObject.add("3", 3); @@ -51,8 +51,7 @@ public class ConfigCreator { yapionObject.add("38", 20); yapionObject.add("39", 8); yapionObject.add("40", 22); - // TODO: WorldEdit Wand - yapionObject.add("41", -1); + yapionObject.add("41", 26); yapionObject.add("42", 12); yapionObject.add("43", 14); return yapionObject; diff --git a/BauSystem_Main/src/de/steamwar/bausystem/features/util/items/NavWandBauGuiItem.java b/BauSystem_Main/src/de/steamwar/bausystem/features/util/items/NavWandBauGuiItem.java new file mode 100644 index 00000000..86a1deaf --- /dev/null +++ b/BauSystem_Main/src/de/steamwar/bausystem/features/util/items/NavWandBauGuiItem.java @@ -0,0 +1,57 @@ +/* + * This file is a part of the SteamWar software. + * + * Copyright (C) 2021 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 . + */ + +package de.steamwar.bausystem.features.util.items; + +import de.steamwar.bausystem.Permission; +import de.steamwar.bausystem.linkage.LinkageType; +import de.steamwar.bausystem.linkage.Linked; +import de.steamwar.bausystem.linkage.specific.BauGuiItem; +import de.steamwar.inventory.SWItem; +import org.bukkit.Material; +import org.bukkit.entity.Player; +import org.bukkit.event.inventory.ClickType; +import org.bukkit.inventory.ItemStack; + +import java.util.Arrays; + +@Linked(LinkageType.BAU_GUI_ITEM) +public class NavWandBauGuiItem extends BauGuiItem { + + public NavWandBauGuiItem() { + super(27); + } + + @Override + public Permission permission() { + return Permission.WORLDEDIT; + } + + @Override + public ItemStack getItem(Player player) { + return new SWItem(Material.WOODEN_AXE, "Navigation Wand", Arrays.asList("Left click: jump to location", "Right click: pass through walls"), false, clickType -> { + }).getItemStack(); + } + + @Override + public boolean click(ClickType click, Player p) { + p.performCommand("/wand -n"); + return false; + } +} diff --git a/BauSystem_Main/src/de/steamwar/bausystem/features/util/items/WorldEditBauGuiItem.java b/BauSystem_Main/src/de/steamwar/bausystem/features/util/items/WorldEditBauGuiItem.java new file mode 100644 index 00000000..90c2575c --- /dev/null +++ b/BauSystem_Main/src/de/steamwar/bausystem/features/util/items/WorldEditBauGuiItem.java @@ -0,0 +1,57 @@ +/* + * This file is a part of the SteamWar software. + * + * Copyright (C) 2021 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 . + */ + +package de.steamwar.bausystem.features.util.items; + +import de.steamwar.bausystem.Permission; +import de.steamwar.bausystem.linkage.LinkageType; +import de.steamwar.bausystem.linkage.Linked; +import de.steamwar.bausystem.linkage.specific.BauGuiItem; +import de.steamwar.inventory.SWItem; +import org.bukkit.Material; +import org.bukkit.entity.Player; +import org.bukkit.event.inventory.ClickType; +import org.bukkit.inventory.ItemStack; + +import java.util.Arrays; + +@Linked(LinkageType.BAU_GUI_ITEM) +public class WorldEditBauGuiItem extends BauGuiItem { + + public WorldEditBauGuiItem() { + super(26); + } + + @Override + public Permission permission() { + return Permission.WORLDEDIT; + } + + @Override + public ItemStack getItem(Player player) { + return new SWItem(Material.WOODEN_AXE, "WorldEdit Wand", Arrays.asList("Left click: select pos #1", "Right click: select pos #2"), false, clickType -> { + }).getItemStack(); + } + + @Override + public boolean click(ClickType click, Player p) { + p.performCommand("/wand"); + return false; + } +}