Damage the player when ChimaeraWing use failed

This commit is contained in:
TfT_02 2013-03-14 22:31:44 +01:00
parent 69bf17a619
commit 5aecedc074

View File

@ -17,6 +17,7 @@ import com.gmail.nossr50.config.Config;
import com.gmail.nossr50.locale.LocaleLoader; import com.gmail.nossr50.locale.LocaleLoader;
import com.gmail.nossr50.metrics.MetricsManager; import com.gmail.nossr50.metrics.MetricsManager;
import com.gmail.nossr50.util.player.UserManager; import com.gmail.nossr50.util.player.UserManager;
import com.gmail.nossr50.util.skills.CombatUtils;
import com.gmail.nossr50.util.skills.SkillUtils; import com.gmail.nossr50.util.skills.SkillUtils;
public final class ChimaeraWing { public final class ChimaeraWing {
@ -62,6 +63,7 @@ public final class ChimaeraWing {
if (location.getY() < player.getWorld().getHighestBlockYAt(location)) { if (location.getY() < player.getWorld().getHighestBlockYAt(location)) {
player.sendMessage(LocaleLoader.getString("Item.ChimaeraWing.Fail")); player.sendMessage(LocaleLoader.getString("Item.ChimaeraWing.Fail"));
player.setVelocity(new Vector(0, 0.5D, 0)); player.setVelocity(new Vector(0, 0.5D, 0));
CombatUtils.dealDamage(player, Misc.getRandom().nextInt(player.getHealth() - 10));
UserManager.getPlayer(player).actualizeLastChimaeraTeleport(); UserManager.getPlayer(player).actualizeLastChimaeraTeleport();
return; return;
} }