Bug Fix with inventory
This commit is contained in:
parent
7a0c4bded9
commit
a3a09d7e8f
3 changed files with 6 additions and 5 deletions
2
pom.xml
2
pom.xml
|
@ -11,7 +11,7 @@
|
||||||
|
|
||||||
<groupId>me.paradoxpixel</groupId>
|
<groupId>me.paradoxpixel</groupId>
|
||||||
<artifactId>themepark</artifactId>
|
<artifactId>themepark</artifactId>
|
||||||
<version>1.2.4</version>
|
<version>1.2.5</version>
|
||||||
|
|
||||||
<repositories>
|
<repositories>
|
||||||
<repository>
|
<repository>
|
||||||
|
|
|
@ -2,13 +2,14 @@ package me.paradoxpixel.themepark.gui;
|
||||||
|
|
||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
import org.bukkit.event.EventHandler;
|
import org.bukkit.event.EventHandler;
|
||||||
|
import org.bukkit.event.EventPriority;
|
||||||
import org.bukkit.event.Listener;
|
import org.bukkit.event.Listener;
|
||||||
import org.bukkit.event.inventory.*;
|
import org.bukkit.event.inventory.*;
|
||||||
import org.bukkit.inventory.Inventory;
|
import org.bukkit.inventory.Inventory;
|
||||||
|
|
||||||
public class GUIListener implements Listener {
|
public class GUIListener implements Listener {
|
||||||
|
|
||||||
@EventHandler
|
@EventHandler(priority = EventPriority.HIGHEST)
|
||||||
public void onClick(InventoryClickEvent e) {
|
public void onClick(InventoryClickEvent e) {
|
||||||
if(e.getClickedInventory() == null)
|
if(e.getClickedInventory() == null)
|
||||||
return;
|
return;
|
||||||
|
@ -22,10 +23,10 @@ public class GUIListener implements Listener {
|
||||||
ClickType type = e.getClick();
|
ClickType type = e.getClick();
|
||||||
|
|
||||||
GUI gui = (GUI) inventory.getHolder();
|
GUI gui = (GUI) inventory.getHolder();
|
||||||
e.setCancelled(gui.execute(player, slot, type));
|
gui.execute(player, slot, type);
|
||||||
}
|
}
|
||||||
|
|
||||||
@EventHandler
|
@EventHandler(priority = EventPriority.HIGHEST)
|
||||||
public void onMove(InventoryClickEvent e) {
|
public void onMove(InventoryClickEvent e) {
|
||||||
if(e.getInventory() == null)
|
if(e.getInventory() == null)
|
||||||
return;
|
return;
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
name: ThemePark
|
name: ThemePark
|
||||||
version: 1.2.4
|
version: 1.2.5
|
||||||
main: me.paradoxpixel.themepark.ThemeParkPlugin
|
main: me.paradoxpixel.themepark.ThemeParkPlugin
|
||||||
author: ParadoxPixel
|
author: ParadoxPixel
|
||||||
softdepend: [PlaceholderAPI]
|
softdepend: [PlaceholderAPI]
|
||||||
|
|
Reference in a new issue