Added safe zone protection for flame
This commit is contained in:
parent
59e564cdc6
commit
0e0582a1a7
@ -263,7 +263,7 @@ public class ClansGame extends MiniPlugin
|
|||||||
{
|
{
|
||||||
// Cancel
|
// Cancel
|
||||||
event.SetCancelled("Clans Ally");
|
event.SetCancelled("Clans Ally");
|
||||||
|
|
||||||
// Inform
|
// Inform
|
||||||
if (damager != null)
|
if (damager != null)
|
||||||
{
|
{
|
||||||
@ -538,7 +538,7 @@ public class ClansGame extends MiniPlugin
|
|||||||
|
|
||||||
ClanInfo clan = _clans.getClanUtility().getOwner(event.getEntity().getLocation());
|
ClanInfo clan = _clans.getClanUtility().getOwner(event.getEntity().getLocation());
|
||||||
if (clan == null) return;
|
if (clan == null) return;
|
||||||
|
|
||||||
if (_clans.getWarManager().isBeingInvaded(clan))
|
if (_clans.getWarManager().isBeingInvaded(clan))
|
||||||
{
|
{
|
||||||
// Allow because of invasion
|
// Allow because of invasion
|
||||||
|
@ -30,6 +30,7 @@ public abstract class AttackAttribute extends ItemAttribute
|
|||||||
@Override
|
@Override
|
||||||
public void onAttack(CustomDamageEvent event)
|
public void onAttack(CustomDamageEvent event)
|
||||||
{
|
{
|
||||||
|
if(event.GetCancellers().contains("Safe Zone")) return;
|
||||||
_attackCount++;
|
_attackCount++;
|
||||||
System.out.println("Attack count " + _attackCount + " - " + _attackLimit);
|
System.out.println("Attack count " + _attackCount + " - " + _attackLimit);
|
||||||
if (_attackCount >= _attackLimit)
|
if (_attackCount >= _attackLimit)
|
||||||
|
Loading…
Reference in New Issue
Block a user