Changed up Boom Bow detection

This commit is contained in:
alisolarflare 2016-11-05 13:58:13 -04:00
parent 64080eaf42
commit a4ce259249
2 changed files with 5 additions and 4 deletions

View file

@ -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());
}
}
}

View file

@ -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);