SHARE
TWEET

Untitled

a guest May 23rd, 2019 57 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. @EventHandler
  2.     public void onRClick(PlayerInteractEvent e) {
  3.         Player p = e.getPlayer();
  4.         Block b = e.getClickedBlock();
  5.         if(e.getHand().equals(EquipmentSlot.HAND) ) {
  6.             if(e.getAction().equals(Action.RIGHT_CLICK_BLOCK)) {
  7.                 if(!main.getConfig().contains(p.getUniqueId() + ".Blocks")) {
  8.  
  9.                     List<String> lista = new ArrayList<String>();
  10.                     lista.add(b.toString());
  11.                     main.getConfig().set(p.getUniqueId() + ".Blocks", lista);
  12.                     main.saveConfig();
  13.  
  14.                     p.sendMessage("Lista: " + main.getConfig().getString(p.getUniqueId() + ".Blocks"));
  15.                     p.sendMessage("Nie Istnieje");
  16.                     return;
  17.                 } else {
  18.                     if (main.getConfig().getStringList(p.getUniqueId() + ".Blocks").contains(b.toString())) {
  19.                         p.sendMessage("§cIstnieje taki blok");
  20.                         return;
  21.                     }
  22.                 }
  23.             }
  24.         }
  25.     }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Not a member of Pastebin yet?
Sign Up, it unlocks many cool features!
 
Top