Advertisement
Guest User

Untitled

a guest
May 23rd, 2019
70
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.80 KB | None | 0 0
  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. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement