diff --git a/BauSystem_Main/src/de/steamwar/bausystem/BauSystem.java b/BauSystem_Main/src/de/steamwar/bausystem/BauSystem.java index af39406f..646056d9 100644 --- a/BauSystem_Main/src/de/steamwar/bausystem/BauSystem.java +++ b/BauSystem_Main/src/de/steamwar/bausystem/BauSystem.java @@ -31,7 +31,6 @@ import org.bukkit.plugin.java.JavaPlugin; import java.io.IOException; import java.io.OutputStream; import java.io.PrintStream; -import java.util.logging.Level; public class BauSystem extends JavaPlugin implements Listener { diff --git a/BauSystem_Main/src/de/steamwar/bausystem/features/autostart/AutoStartGuiItem.java b/BauSystem_Main/src/de/steamwar/bausystem/features/autostart/AutoStartGuiItem.java index a3013c96..d047a12f 100644 --- a/BauSystem_Main/src/de/steamwar/bausystem/features/autostart/AutoStartGuiItem.java +++ b/BauSystem_Main/src/de/steamwar/bausystem/features/autostart/AutoStartGuiItem.java @@ -20,7 +20,7 @@ package de.steamwar.bausystem.features.autostart; import de.steamwar.bausystem.Permission; -import de.steamwar.bausystem.linkage.GuiItem; +import de.steamwar.bausystem.linkage.BauGuiItem; import de.steamwar.bausystem.linkage.LinkageType; import de.steamwar.bausystem.linkage.Linked; import de.steamwar.inventory.SWItem; @@ -31,8 +31,8 @@ import org.bukkit.inventory.ItemStack; import java.util.Arrays; -@Linked(LinkageType.GUI_ITEM) -public class AutoStartGuiItem extends GuiItem { +@Linked(LinkageType.BAU_GUI_ITEM) +public class AutoStartGuiItem extends BauGuiItem { public AutoStartGuiItem() { super(24); diff --git a/BauSystem_Main/src/de/steamwar/bausystem/features/countingwand/CountingwandGuiItem.java b/BauSystem_Main/src/de/steamwar/bausystem/features/countingwand/CountingwandGuiItem.java index 97e88047..6b1506bd 100644 --- a/BauSystem_Main/src/de/steamwar/bausystem/features/countingwand/CountingwandGuiItem.java +++ b/BauSystem_Main/src/de/steamwar/bausystem/features/countingwand/CountingwandGuiItem.java @@ -21,20 +21,20 @@ package de.steamwar.bausystem.features.countingwand; import de.steamwar.bausystem.Permission; import de.steamwar.bausystem.config.ColorConfig; -import de.steamwar.bausystem.features.gui.BauGUI; -import de.steamwar.bausystem.linkage.GuiItem; +import de.steamwar.bausystem.linkage.BauGuiItem; import de.steamwar.bausystem.linkage.LinkageType; import de.steamwar.bausystem.linkage.Linked; import de.steamwar.inventory.SWItem; -import java.util.Arrays; 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.GUI_ITEM) -public class CountingwandGuiItem extends GuiItem { + +@Linked(LinkageType.BAU_GUI_ITEM) +public class CountingwandGuiItem extends BauGuiItem { public CountingwandGuiItem() { super(22); @@ -43,8 +43,8 @@ public class CountingwandGuiItem extends GuiItem { @Override public ItemStack getItem(Player player) { return new SWItem(Material.STICK, - ColorConfig.HIGHLIGHT + "Counting Wand", - Arrays.asList(ColorConfig.HIGHLIGHT + "Linksklick" + ColorConfig.OTHER + " - " + ColorConfig.BASE + "Setzt die 1. Position", + ColorConfig.HIGHLIGHT + "Counting Wand", + Arrays.asList(ColorConfig.HIGHLIGHT + "Linksklick" + ColorConfig.OTHER + " - " + ColorConfig.BASE + "Setzt die 1. Position", ColorConfig.HIGHLIGHT + "Rechtsklick" + ColorConfig.OTHER + " - " + ColorConfig.BASE + "Setzt die 2. Position"), false, clickType -> { }).getItemStack(); diff --git a/BauSystem_Main/src/de/steamwar/bausystem/features/redstonetester/RedstoneTesterGuiItem.java b/BauSystem_Main/src/de/steamwar/bausystem/features/redstonetester/RedstoneTesterGuiItem.java index 9650ad49..86e83a71 100644 --- a/BauSystem_Main/src/de/steamwar/bausystem/features/redstonetester/RedstoneTesterGuiItem.java +++ b/BauSystem_Main/src/de/steamwar/bausystem/features/redstonetester/RedstoneTesterGuiItem.java @@ -21,7 +21,7 @@ package de.steamwar.bausystem.features.redstonetester; import de.steamwar.bausystem.Permission; import de.steamwar.bausystem.config.ColorConfig; -import de.steamwar.bausystem.linkage.GuiItem; +import de.steamwar.bausystem.linkage.BauGuiItem; import de.steamwar.bausystem.linkage.LinkageType; import de.steamwar.bausystem.linkage.Linked; import de.steamwar.inventory.SWItem; @@ -32,8 +32,8 @@ import org.bukkit.inventory.ItemStack; import java.util.Arrays; -@Linked(LinkageType.GUI_ITEM) -public class RedstoneTesterGuiItem extends GuiItem { +@Linked(LinkageType.BAU_GUI_ITEM) +public class RedstoneTesterGuiItem extends BauGuiItem { public RedstoneTesterGuiItem() { super(23); diff --git a/BauSystem_Main/src/de/steamwar/bausystem/features/world/InventoryListener.java b/BauSystem_Main/src/de/steamwar/bausystem/features/world/InventoryListener.java index a06ed3c1..efc0ac8e 100644 --- a/BauSystem_Main/src/de/steamwar/bausystem/features/world/InventoryListener.java +++ b/BauSystem_Main/src/de/steamwar/bausystem/features/world/InventoryListener.java @@ -19,8 +19,9 @@ package de.steamwar.bausystem.features.world; +import de.steamwar.bausystem.linkage.LinkageType; +import de.steamwar.bausystem.linkage.Linked; import de.steamwar.core.Core; -import org.bukkit.Material; import org.bukkit.attribute.Attribute; import org.bukkit.enchantments.Enchantment; import org.bukkit.event.EventHandler; @@ -29,12 +30,12 @@ import org.bukkit.event.inventory.InventoryClickEvent; import org.bukkit.inventory.ItemStack; import org.bukkit.inventory.meta.ItemMeta; -//@Linked(LinkageType.LISTENER) +@Linked(LinkageType.LISTENER) public class InventoryListener implements Listener { @EventHandler public void onInventoryClick(InventoryClickEvent e) { - ItemStack stack = e.getCursor(); + ItemStack stack = e.getCurrentItem(); if (stack == null || !stack.hasItemMeta()) { return; } @@ -47,11 +48,6 @@ public class InventoryListener implements Listener { } } - Material material = stack.getType(); - if (material == Material.POTION || material == Material.SPLASH_POTION || material == Material.LINGERING_POTION) { - stack.setType(Material.MILK_BUCKET); - } - if (Core.getVersion() < 15) { e.setCurrentItem(stack); return;