From 7a0c4bded9a85666ef8cae75a9800aa24d172816 Mon Sep 17 00:00:00 2001 From: BuildTools Date: Mon, 4 Mar 2019 15:53:34 +0100 Subject: [PATCH] Fixes --- pom.xml | 2 +- .../me/paradoxpixel/themepark/gui/GUIListener.java | 10 ++++------ src/main/resources/plugin.yml | 2 +- 3 files changed, 6 insertions(+), 8 deletions(-) diff --git a/pom.xml b/pom.xml index 47b32a3..a2812bc 100644 --- a/pom.xml +++ b/pom.xml @@ -11,7 +11,7 @@ me.paradoxpixel themepark - 1.2.2 + 1.2.4 diff --git a/src/main/java/me/paradoxpixel/themepark/gui/GUIListener.java b/src/main/java/me/paradoxpixel/themepark/gui/GUIListener.java index 0d8ab0d..db3b3c4 100644 --- a/src/main/java/me/paradoxpixel/themepark/gui/GUIListener.java +++ b/src/main/java/me/paradoxpixel/themepark/gui/GUIListener.java @@ -3,9 +3,7 @@ package me.paradoxpixel.themepark.gui; import org.bukkit.entity.Player; import org.bukkit.event.EventHandler; import org.bukkit.event.Listener; -import org.bukkit.event.inventory.ClickType; -import org.bukkit.event.inventory.InventoryClickEvent; -import org.bukkit.event.inventory.InventoryMoveItemEvent; +import org.bukkit.event.inventory.*; import org.bukkit.inventory.Inventory; public class GUIListener implements Listener { @@ -28,11 +26,11 @@ public class GUIListener implements Listener { } @EventHandler - public void onMove(InventoryMoveItemEvent e) { - if(e.getDestination() == null) + public void onMove(InventoryClickEvent e) { + if(e.getInventory() == null) return; - Inventory inventory = e.getDestination(); + Inventory inventory = e.getInventory(); if(!(inventory.getHolder() instanceof GUIHolder)) return; diff --git a/src/main/resources/plugin.yml b/src/main/resources/plugin.yml index 7ee7d06..869a5a3 100644 --- a/src/main/resources/plugin.yml +++ b/src/main/resources/plugin.yml @@ -1,5 +1,5 @@ name: ThemePark -version: 1.2.2 +version: 1.2.4 main: me.paradoxpixel.themepark.ThemeParkPlugin author: ParadoxPixel softdepend: [PlaceholderAPI]