Advertisement
Guest User

Untitled

a guest
Jul 30th, 2016
69
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.64 KB | None | 0 0
  1. if (e.getAction() == Action.RIGHT_CLICK_BLOCK &&
  2. (e.getClickedBlock().getType().equals(Material.COMMAND) ||
  3. e.getClickedBlock().getType().equals(Material.COMMAND_CHAIN) ||
  4. e.getClickedBlock().getType().equals(Material.COMMAND_REPEATING)) &&
  5. p.hasPermission("commandblock.access")) {
  6. WrapperPlayServerTileEntityData packet = new WrapperPlayServerTileEntityData();
  7. packet.setAction(2); // set command block info
  8. packet.setLocation(new BlockPosition(e.getClickedBlock().getLocation().toVector()));
  9. NbtFactory.asCompound(NbtFactory.readBlockState(e.getClickedBlock())).deepClone(); // <-- It fails here, at readBlockState
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement