Guest User

Untitled

a guest
Oct 22nd, 2017
72
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.60 KB | None | 0 0
  1. public void onBlockBreak(BlockBreakEvent event) {
  2. Player player = event.getPlayer();
  3. Block block = event.getBlock();
  4. String world = event.getBlock().getWorld().getName();
  5.  
  6. if (discoMain.players.contains(player)) {
  7. if (block.getType() == Material.WOOL) {
  8. player.sendMessage(ChatColor.YELLOW + "You removed a WOOL at "
  9. + block.getX() + ", " + block.getY() + ", " + block.getZ()
  10. + " in the world " + world);
  11. String name = discoMain.names.get(player); //gets disco name
  12. discoMain.blocks.remove(name); //removes disco from blocks
  13. discoPreferences.write();
  14. }
  15. }
  16. }
Add Comment
Please, Sign In to add comment