turf forts self kill fix.

This commit is contained in:
Chiss 2013-09-02 15:07:07 +10:00
parent c483d869a5
commit 98b285d819

View File

@ -96,6 +96,7 @@ public class TurfForts extends TeamGame
this.BlockBreakAllow.add(35);
this.ItemDrop = false;
this.ItemPickup = false;
this.DamageSelf = false;
}
@Override
@ -133,6 +134,8 @@ public class TurfForts extends TeamGame
if (event.GetLog().GetKiller() == null)
return;
Player killed = (Player)event.GetEvent().getEntity();
Player killer = UtilPlayer.searchExact(event.GetLog().GetKiller().GetName());
if (killer == null)
@ -140,6 +143,12 @@ public class TurfForts extends TeamGame
if (GetTeam(killer) == null)
return;
if (GetTeam(killed) == null)
return;
if (GetTeam(killer).equals(GetTeam(killed)))
return;
if (GetTeam(killer).GetColor() == ChatColor.RED)
{
@ -325,6 +334,9 @@ public class TurfForts extends TeamGame
@EventHandler
public void Damage(CustomDamageEvent event)
{
if (event.IsCancelled())
return;
if (!_fight)
{
event.SetCancelled("Build Time");