示例#1
0
  /**
   * Handle the Leaf Blower ability.
   *
   * @param player Player using the ability
   * @param block Block being broken
   */
  public static void leafBlower(Player player, Block block) {
    FakePlayerAnimationEvent armswing = new FakePlayerAnimationEvent(player);
    mcMMO.p.getServer().getPluginManager().callEvent(armswing);

    if (Config.getInstance().getWoodcuttingRequiresTool()) {
      Skills.abilityDurabilityLoss(
          player.getItemInHand(), Config.getInstance().getAbilityToolDamage());
    }

    if (mcMMO.spoutEnabled) {
      SpoutSounds.playSoundForPlayer(SoundEffect.POP, player, block.getLocation());
    }
  }
示例#2
0
  /**
   * Handle triple drops from Giga Drill Breaker.
   *
   * @param player The player using the ability
   * @param block The block to check
   */
  public static void gigaDrillBreaker(Player player, Block block) {
    Skills.abilityDurabilityLoss(
        player.getItemInHand(), Config.getInstance().getAbilityToolDamage());

    if (!mcMMO.placeStore.isTrue(block)) {
      FakePlayerAnimationEvent armswing = new FakePlayerAnimationEvent(player);
      mcMMO.p.getServer().getPluginManager().callEvent(armswing);

      Excavation.excavationProcCheck(block, player);
      Excavation.excavationProcCheck(block, player);
    }

    if (mcMMO.p.spoutEnabled) {
      SpoutSounds.playSoundForPlayer(SoundEffect.POP, player, block.getLocation());
    }
  }