Fix Tumble.

This commit is contained in:
sigonasr2 2016-07-24 22:29:58 -05:00
parent 4506d0b7c1
commit a7e10880ea
4 changed files with 12 additions and 10 deletions

Binary file not shown.

View File

@ -1,6 +1,6 @@
name: TwosideKeeper name: TwosideKeeper
main: sig.plugin.TwosideKeeper.TwosideKeeper main: sig.plugin.TwosideKeeper.TwosideKeeper
version: 3.7.0 version: 3.7.0r1
commands: commands:
money: money:
description: Tells the player the amount of money they are holding. description: Tells the player the amount of money they are holding.

View File

@ -2658,14 +2658,16 @@ public class GenericFunctions {
} }
public static void subtractHealth(final LivingEntity entity, double dmg) { public static void subtractHealth(final LivingEntity entity, double dmg) {
if (entity.getHealth()>dmg) { if (!entity.hasPotionEffect(PotionEffectType.GLOWING) && entity instanceof Player) {
entity.setHealth(entity.getHealth()-dmg); if (entity.getHealth()>dmg) {
} else { entity.setHealth(entity.getHealth()-dmg);
/*List<ItemStack> drops = new ArrayList<ItemStack>(); } else {
EntityDeathEvent ev = new EntityDeathEvent(entity,drops); /*List<ItemStack> drops = new ArrayList<ItemStack>();
Bukkit.getPluginManager().callEvent(ev); EntityDeathEvent ev = new EntityDeathEvent(entity,drops);
entity.setHealth(0);*/ Bukkit.getPluginManager().callEvent(ev);
entity.damage(Integer.MAX_VALUE); entity.setHealth(0);*/
entity.damage(Integer.MAX_VALUE);
}
} }
} }