turf forts self kill fix.
This commit is contained in:
parent
c483d869a5
commit
98b285d819
@ -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");
|
||||
|
Loading…
Reference in New Issue
Block a user