Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- @EventHandler
- public void onBlockInteract(PlayerInteractEvent event){
- Player p = event.getPlayer();
- if(event.getAction() == Action.RIGHT_CLICK_BLOCK){
- Location loc = event.getClickedBlock().getLocation();
- if(event.getAction() == Action.RIGHT_CLICK_BLOCK){
- if(loc.getBlock().getType() == Material.CHEST){
- PrivateSignManager.isProtected(loc.getBlock());
- }
- if(loc.getBlock().getState() instanceof Sign){
- Kingdoms plugin = Kingdoms.getInstance();
- if(plugin.privatesigns.getStringList(signLocationToString(loc,plugin.getChunkKingdom(loc.getChunk()))) != null){
- PrivateSignGUI.openMenu(p, loc.getBlock(), plugin);
- }
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement