Add missing safe log qualifications
This commit is contained in:
parent
010b85d1c3
commit
128e16cbcd
@ -71,6 +71,11 @@ public class SafeLog extends MiniPlugin
|
|||||||
isSafeLog = true;
|
isSafeLog = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (Managers.get(ClansFreezeManager.class).isPanicking(player))
|
||||||
|
{
|
||||||
|
isSafeLog = true;
|
||||||
|
}
|
||||||
|
|
||||||
if (Managers.get(RestartManager.class).isRestarting())
|
if (Managers.get(RestartManager.class).isRestarting())
|
||||||
{
|
{
|
||||||
isSafeLog = true;
|
isSafeLog = true;
|
||||||
@ -81,14 +86,21 @@ public class SafeLog extends MiniPlugin
|
|||||||
isSafeLog = true;
|
isSafeLog = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (_clansManager.hasTimer(player))
|
||||||
|
{
|
||||||
|
isSafeLog = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (_clansManager.getIncognitoManager().Get(player).Status)
|
||||||
|
{
|
||||||
|
isSafeLog = true;
|
||||||
|
}
|
||||||
|
|
||||||
if (!isSafeLog)
|
if (!isSafeLog)
|
||||||
{
|
|
||||||
if (!_clansManager.getIncognitoManager().Get(player).Status)
|
|
||||||
{
|
{
|
||||||
NPCManager.getInstance().spawnLogoutNpc(player);
|
NPCManager.getInstance().spawnLogoutNpc(player);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
public void onPlayerJoin(final Player player)
|
public void onPlayerJoin(final Player player)
|
||||||
{
|
{
|
||||||
@ -117,14 +129,11 @@ public class SafeLog extends MiniPlugin
|
|||||||
|
|
||||||
stream.close();
|
stream.close();
|
||||||
|
|
||||||
UtilServer.getServer().getScheduler().scheduleSyncDelayedTask(getPlugin(), new Runnable()
|
UtilServer.getServer().getScheduler().scheduleSyncDelayedTask(getPlugin(), () ->
|
||||||
{
|
|
||||||
public void run()
|
|
||||||
{
|
{
|
||||||
_clansManager.ClanTips.displayTip(TipType.NPC_RIPPARONI, player);
|
_clansManager.ClanTips.displayTip(TipType.NPC_RIPPARONI, player);
|
||||||
UtilPlayer.message(player, F.main("SafeLog", "You were killed by " + F.elem(killerName) + " when you logged out! This happened about " + F.time(UtilTime.MakeStr(System.currentTimeMillis() - time))) + " ago.");
|
UtilPlayer.message(player, F.main("SafeLog", "You were killed by " + F.elem(killerName) + " when you logged out! This happened about " + F.time(UtilTime.MakeStr(System.currentTimeMillis() - time))) + " ago.");
|
||||||
UtilTextMiddle.display("Offline Death", "Log out in a safer place next time!", 15, 80, 40, player);
|
UtilTextMiddle.display("Offline Death", "Log out in a safer place next time!", 15, 80, 40, player);
|
||||||
}
|
|
||||||
}, 15);
|
}, 15);
|
||||||
|
|
||||||
deathFile.delete();
|
deathFile.delete();
|
||||||
|
Loading…
Reference in New Issue
Block a user