BlackBeltPanda

Code

Jul 2nd, 2015
260
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.57 KB | None | 0 0
  1. @EventHandler(priority = EventPriority.HIGH, ignoreCancelled=true)
  2. public void onBlockBreak(BlockBreakEvent event){
  3. if (event.getPlayer().getItemInHand() == null) return;
  4. ItemStack item = event.getPlayer().getItemInHand();
  5. if (EnchantsPlugin.getUtils().readEnchants(item).contains("PickaxeCubed")) return; //Line 207
  6. if (item.hasItemMeta()){
  7. if (item.getItemMeta().hasDisplayName()){
  8. if (item.getItemMeta().getDisplayName().contains(ChatColor.RED + "Pickaxe")){
  9. EnchantsPlugin.getUtils().getParser().applyAllEnchants("PickaxeCubed:1", item);
  10. }
  11. }
  12. }
  13. }
Advertisement
Add Comment
Please, Sign In to add comment