Fix for NoCheatPlus fight.noswing checks

This commit is contained in:
GJ 2012-05-24 08:38:44 -04:00
parent 257df25a67
commit a104fe45aa
2 changed files with 9 additions and 1 deletions

View File

@ -7,6 +7,9 @@ Key:
! Change ! Change
- Removal - Removal
Version 1.3.09
= Fixed issue with NoCheatPlus and Serrated Strikes / Skull Splitter (fight.noswing)
Version 1.3.08 Version 1.3.08
+ Added more notifications about Vampirism and Hardcore mode on player death + Added more notifications about Vampirism and Hardcore mode on player death
+ Added information about Hardcore mode when joining a server running Hardcore mode + Added information about Hardcore mode when joining a server running Hardcore mode

View File

@ -14,6 +14,7 @@ import org.bukkit.entity.Wolf;
import org.bukkit.event.entity.EntityDamageByEntityEvent; import org.bukkit.event.entity.EntityDamageByEntityEvent;
import org.bukkit.event.entity.EntityDamageEvent; import org.bukkit.event.entity.EntityDamageEvent;
import org.bukkit.event.entity.EntityDamageEvent.DamageCause; import org.bukkit.event.entity.EntityDamageEvent.DamageCause;
import org.bukkit.event.player.PlayerAnimationEvent;
import org.bukkit.inventory.ItemStack; import org.bukkit.inventory.ItemStack;
import com.gmail.nossr50.mcMMO; import com.gmail.nossr50.mcMMO;
@ -386,6 +387,9 @@ public class Combat {
break; break;
} }
PlayerAnimationEvent armswing = new PlayerAnimationEvent(attacker);
plugin.getServer().getPluginManager().callEvent(armswing);
if (entity instanceof Player) { if (entity instanceof Player) {
Player defender = (Player) entity; Player defender = (Player) entity;
@ -406,7 +410,8 @@ public class Combat {
if (playerProfile.getGodMode()) { if (playerProfile.getGodMode()) {
continue; continue;
} }
} else if (entity instanceof Tameable) { }
else if (entity instanceof Tameable) {
AnimalTamer tamer = ((Tameable) entity).getOwner(); AnimalTamer tamer = ((Tameable) entity).getOwner();
if (tamer instanceof Player) { if (tamer instanceof Player) {