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