From a4ce25924930c6be5d4e677a1a758be4b880200e Mon Sep 17 00:00:00 2001 From: alisolarflare Date: Sat, 5 Nov 2016 13:58:13 -0400 Subject: [PATCH] Changed up Boom Bow detection --- src/alisolarflare/magic/tricks/BoomBowDeathListener.java | 8 ++++---- src/alisolarflare/magic/tricks/BoomBowListener.java | 1 + 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/src/alisolarflare/magic/tricks/BoomBowDeathListener.java b/src/alisolarflare/magic/tricks/BoomBowDeathListener.java index b742f16..c436a97 100644 --- a/src/alisolarflare/magic/tricks/BoomBowDeathListener.java +++ b/src/alisolarflare/magic/tricks/BoomBowDeathListener.java @@ -9,12 +9,12 @@ public class BoomBowDeathListener implements Listener{ @EventHandler public void onBoomBowDeath(PlayerDeathEvent event){ Player player = event.getEntity(); - if (player.getLastDamage() == 7.000042) + if (player.getLastDamage() == 7.000042){ player.sendMessage("42!"); event.setDeathMessage(player.getName() + "got trigger happy with the Boom Bow"); - if (player.getLastDamage() < 7.000041 || player.getLastDamage() > 7.000043) + } + if (player.getLastDamage() < 7.000041 || player.getLastDamage() > 7.000043){ player.sendMessage("meaning of lyyyyyyfffe"); - player.sendMessage(player.getCustomName() + player.getDisplayName() + player.getPlayerListName() + player.getName()); - + } } } diff --git a/src/alisolarflare/magic/tricks/BoomBowListener.java b/src/alisolarflare/magic/tricks/BoomBowListener.java index 130cf88..a2560c6 100644 --- a/src/alisolarflare/magic/tricks/BoomBowListener.java +++ b/src/alisolarflare/magic/tricks/BoomBowListener.java @@ -96,6 +96,7 @@ public class BoomBowListener implements Listener { player.getWorld().playSound(playerLocation, Sound.ENTITY_GENERIC_EXPLODE, 10, -20); player.getWorld().spawnParticle(Particle.EXPLOSION_HUGE, playerLocation, 2); player.damage(7.000042, player); + player.sendMessage(player.getLastDamage() + ""); boomBow.setDurability((short) (boomBow.getDurability() + 3)); if(boomBow.getDurability() < 0){ player.getInventory().setItemInMainHand(null);