Fix Tumble.

dev
sigonasr2 9 years ago
parent 4506d0b7c1
commit a7e10880ea
  1. BIN
      TwosideKeeper.jar
  2. 2
      src/plugin.yml
  3. 18
      src/sig/plugin/TwosideKeeper/HelperStructures/Common/GenericFunctions.java
  4. 2
      src/sig/plugin/TwosideKeeper/TwosideKeeper.java

Binary file not shown.

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

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

@ -3646,7 +3646,7 @@ public class TwosideKeeper extends JavaPlugin implements Listener {
}
break;
}
}
}
//If glowing, the player is invulnerable.
if (p.hasPotionEffect(PotionEffectType.GLOWING)) {

Loading…
Cancel
Save