mirror of
https://github.com/PikaMug/Quests.git
synced 2024-11-22 02:25:42 +01:00
Delay close of NPC GUI, fixes #2120. Bump version
This commit is contained in:
parent
d76082d484
commit
d08df181a7
@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user