Examples of breakNaturally()


Examples of org.bukkit.block.Block.breakNaturally()

      if (breakBlock && wY >= 5) {
        if (!DigSettings.isDropAll(player)) {
          if (dontDrop.contains(String.valueOf(block.getTypeId()))) {
            block.setTypeId(0);
          } else {
            block.breakNaturally(tool);
          }
        } else {
          block.breakNaturally(tool);
        }
        tool.setDurability((short) (durability + toolDamage));
View Full Code Here

Examples of org.bukkit.block.Block.breakNaturally()

            block.setTypeId(0);
          } else {
            block.breakNaturally(tool);
          }
        } else {
          block.breakNaturally(tool);
        }
        tool.setDurability((short) (durability + toolDamage));

      }
    }
View Full Code Here

Examples of org.bukkit.block.Block.breakNaturally()

                    break;
                }
            }
            if (!found) return;
            if (!verify(BukkitUtil.toChangedSign((Sign) event.getBlock().getState(), lines, player), player)) {
                block.breakNaturally();
                event.setCancelled(true);
                return;
            }
            player.checkPermission("craftbook.vehicles." + getName().toLowerCase(Locale.ENGLISH));
            event.setLine(lineNum, "[" + lineFound + "]");
View Full Code Here

Examples of org.bukkit.block.Block.breakNaturally()

            player.checkPermission("craftbook.vehicles." + getName().toLowerCase(Locale.ENGLISH));
            event.setLine(lineNum, "[" + lineFound + "]");
            player.print(getName() + " Created!");
        } catch (InsufficientPermissionsException e) {
            player.printError("vehicles.create-permission");
            block.breakNaturally();
            event.setCancelled(true);
        }
    }

    public abstract String getName();
View Full Code Here

Examples of org.bukkit.block.Block.breakNaturally()

            hasPlanted = true;

        TreeSpecies species = null;
        if(placeSaplings && usedBlock.getState().getData() instanceof Tree && (usedBlock.getRelative(0, -1, 0).getType() == Material.DIRT || usedBlock.getRelative(0, -1, 0).getType() == Material.GRASS || usedBlock.getRelative(0, -1, 0).getType() == Material.MYCEL) && !hasPlanted)
            species = ((Tree) usedBlock.getState().getData()).getSpecies();
        usedBlock.breakNaturally(event.getPlayer().getItemInHand());
        if(species != null) {
            final TreeSpecies fspecies = species;
            Bukkit.getScheduler().runTaskLater(CraftBookPlugin.inst(), new Runnable() {

                @Override
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.