if(!enabled || currentRound == null)
return;
if(event.entity instanceof EntityPlayerMP)
{
EntityPlayerMP player = (EntityPlayerMP)event.entity;
PlayerData data = PlayerHandler.getPlayerData(player);
DamageSource source = event.source;
if(data.team == Team.spectators && source != DamageSource.generic)
{
event.setCanceled(true);
return;
}
if(source instanceof EntityDamageSource && source.getEntity() instanceof EntityPlayerMP)
{
EntityPlayerMP attacker = ((EntityPlayerMP) source.getEntity());
PlayerData attackerData = PlayerHandler.getPlayerData(attacker);
if(attackerData == null)
return;
//Can hurt self