This commit is contained in:
samczsun 2017-03-15 20:23:22 -04:00 committed by cnr
parent bd1d73d390
commit d69c4b3dca

View File

@ -12,6 +12,7 @@ import org.bukkit.Sound;
import org.bukkit.entity.Player;
import org.bukkit.event.EventHandler;
import org.bukkit.event.Listener;
import org.bukkit.event.inventory.InventoryClickEvent;
import org.bukkit.event.inventory.InventoryType;
import org.bukkit.event.player.PlayerCommandPreprocessEvent;
import org.bukkit.event.player.PlayerInteractEvent;
@ -247,6 +248,18 @@ public class GameHostManager implements Listener
}
}
@EventHandler
public void onClick(InventoryClickEvent event)
{
if (_shop.isPlayerInShop(event.getWhoClicked()))
{
if (event.getClickedInventory().getType() == InventoryType.PLAYER)
{
event.setCancelled(true);
}
}
}
@EventHandler
public void adminJoin(PlayerJoinEvent event)
{