Advertisement
Guest User

Untitled

a guest
Oct 9th, 2015
96
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.66 KB | None | 0 0
  1. @EventHandler
  2. public void onBlockInteract(PlayerInteractEvent event){
  3. Player p = event.getPlayer();
  4. if(event.getAction() == Action.RIGHT_CLICK_BLOCK){
  5. Location loc = event.getClickedBlock().getLocation();
  6. if(event.getAction() == Action.RIGHT_CLICK_BLOCK){
  7. if(loc.getBlock().getType() == Material.CHEST){
  8.  
  9. PrivateSignManager.isProtected(loc.getBlock());
  10. }
  11.  
  12. if(loc.getBlock().getState() instanceof Sign){
  13. Kingdoms plugin = Kingdoms.getInstance();
  14. if(plugin.privatesigns.getStringList(signLocationToString(loc,plugin.getChunkKingdom(loc.getChunk()))) != null){
  15. PrivateSignGUI.openMenu(p, loc.getBlock(), plugin);
  16. }
  17. }
  18. }
  19. }
  20. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement