Merge branch 'clans/alpha' of ssh://184.154.0.242:7999/min/Mineplex into clans/alpha
This commit is contained in:
commit
6c7d08a8f9
@ -480,7 +480,7 @@ public class ClanInfo
|
||||
|
||||
public boolean isOnline()
|
||||
{
|
||||
return isOnlineNow();// || System.currentTimeMillis() - _lastOnline.getTime() < Clans.getOnlineTime();
|
||||
return isOnlineNow();
|
||||
}
|
||||
|
||||
public String getProtected()
|
||||
@ -489,7 +489,7 @@ public class ClanInfo
|
||||
if (cur.isOnline())
|
||||
return C.cRed + "No - Clan Members are Online";
|
||||
|
||||
if (System.currentTimeMillis() - _lastOnline.getTime() > Clans.getOnlineTime())
|
||||
if (UtilTime.elapsed(_lastOnline.getTime(), Clans.getOnlineTime()))
|
||||
return C.cGreen + "Yes - Clan Members are Offline";
|
||||
|
||||
return C.cGold
|
||||
@ -498,6 +498,10 @@ public class ClanInfo
|
||||
TimeUnit.FIT) + " to Protection";
|
||||
}
|
||||
|
||||
public boolean isProtected() {
|
||||
return getProtected().startsWith(C.cGreen + "Yes");
|
||||
}
|
||||
|
||||
public TntGenerator getGenerator()
|
||||
{
|
||||
return _generator;
|
||||
|
@ -521,7 +521,8 @@ public class ClansGame extends MiniPlugin
|
||||
ClanInfo clan = _clans.getClanUtility().getClanByPlayer(event.getPlayer());
|
||||
if (clan == null) return;
|
||||
|
||||
clan.setLastOnline(new Timestamp(System.currentTimeMillis()));
|
||||
if(!clan.isOnline()) clan.setLastOnline(new Timestamp(System.currentTimeMillis())); //Noone else on
|
||||
else clan.setLastOnline(new Timestamp(0));
|
||||
}
|
||||
|
||||
@EventHandler(priority = EventPriority.LOWEST)
|
||||
@ -545,7 +546,7 @@ public class ClansGame extends MiniPlugin
|
||||
return;
|
||||
}
|
||||
|
||||
if (!clan.isOnline())
|
||||
if (!clan.isProtected())
|
||||
event.setCancelled(true);
|
||||
else
|
||||
clan.inform(C.cRed + "Your Territory is under attack!", null);
|
||||
|
@ -30,6 +30,7 @@ public abstract class AttackAttribute extends ItemAttribute
|
||||
@Override
|
||||
public void onAttack(CustomDamageEvent event)
|
||||
{
|
||||
if(event.GetCancellers().contains("Safe Zone")) return;
|
||||
_attackCount++;
|
||||
System.out.println("Attack count " + _attackCount + " - " + _attackLimit);
|
||||
if (_attackCount >= _attackLimit)
|
||||
|
Loading…
Reference in New Issue
Block a user