mirror of
https://github.com/BentoBoxWorld/BentoBox.git
synced 2024-11-23 19:25:12 +01:00
Merge remote-tracking branch 'origin/develop' into develop
This commit is contained in:
commit
bd64f94e13
@ -12,6 +12,7 @@ import org.bukkit.event.Listener;
|
||||
import org.bukkit.event.inventory.InventoryClickEvent;
|
||||
import org.bukkit.event.inventory.InventoryCloseEvent;
|
||||
import org.bukkit.event.inventory.InventoryType.SlotType;
|
||||
import org.bukkit.event.player.PlayerKickEvent;
|
||||
import org.bukkit.event.player.PlayerQuitEvent;
|
||||
import org.bukkit.event.server.PluginDisableEvent;
|
||||
import org.bukkit.inventory.InventoryView;
|
||||
@ -31,7 +32,8 @@ public class PanelListenerManager implements Listener {
|
||||
InventoryView view = event.getView();
|
||||
|
||||
// Open the inventory panel that this player has open (they can only ever have one)
|
||||
if (openPanels.containsKey(user.getUniqueId())) {
|
||||
if (openPanels.containsKey(user.getUniqueId()) &&
|
||||
openPanels.get(user.getUniqueId()).getInventory().equals(event.getClickedInventory())) {
|
||||
// Cancel the event. If they don't want it to be cancelled then the click handler(s) should
|
||||
// uncancel it. If gui was from our environment, then cancel event anyway.
|
||||
event.setCancelled(true);
|
||||
|
Loading…
Reference in New Issue
Block a user