diff --git a/core/src/main/java/me/blackvein/quests/listeners/PlayerListener.java b/core/src/main/java/me/blackvein/quests/listeners/PlayerListener.java index c79e49b79..e9e9133b4 100644 --- a/core/src/main/java/me/blackvein/quests/listeners/PlayerListener.java +++ b/core/src/main/java/me/blackvein/quests/listeners/PlayerListener.java @@ -126,6 +126,7 @@ public class PlayerListener implements Listener { if (event.getView().getTitle().contains(Lang.get(player, "quests"))) { final ItemStack clicked = event.getCurrentItem(); if (ItemUtil.isItem(clicked)) { + event.setCancelled(true); for (final IQuest quest : plugin.getLoadedQuests()) { final Quest bukkitQuest = (Quest)quest; if (quest.getGUIDisplay() != null) { @@ -137,12 +138,12 @@ public class PlayerListener implements Listener { e.printStackTrace(); } } - event.getWhoClicked().closeInventory(); - break; + plugin.getServer().getScheduler().runTaskLater(plugin, () -> + event.getWhoClicked().closeInventory(), 1L); + return; } } } - event.setCancelled(true); } } } diff --git a/pom.xml b/pom.xml index 5a205eeee..9b1641b09 100644 --- a/pom.xml +++ b/pom.xml @@ -21,7 +21,7 @@ - 4.8.3 + 4.8.4 true resolveCiFriendliesOnly UTF-8