mirror of
https://github.com/AtlasMediaGroup/TotalFreedomMod.git
synced 2025-06-12 13:53:54 +00:00
Merge branch 'frontdoor-and-banExpiry-only' of https://github.com/AtlasMediaGroup/TotalFreedomMod into frontdoor-and-banExpiry-only
This commit is contained in:
@ -72,7 +72,15 @@ public class ActivityLogEntry implements IConfig
|
||||
|
||||
public void addLogout()
|
||||
{
|
||||
String lastLoginString = timestamps.get(timestamps.size() - 1); // there's a bug with subtracting the -1 here
|
||||
// Fix of Array index out of bonds issue: FS-131
|
||||
String lastLoginString;
|
||||
if(timestamps.size() > 1)
|
||||
{
|
||||
lastLoginString = timestamps.get(timestamps.size() - 1);
|
||||
}else
|
||||
{
|
||||
lastLoginString = timestamps.get(0);
|
||||
}
|
||||
Date currentTime = Date.from(Instant.now());
|
||||
timestamps.add("Logout: " + FUtil.dateToString(currentTime));
|
||||
lastLoginString = lastLoginString.replace("Login: ", "");
|
||||
|
@ -240,7 +240,8 @@ public class AdminList extends FreedomService
|
||||
|
||||
public boolean isVerifiedAdmin(Player player)
|
||||
{
|
||||
return verifiedNoAdmin.contains(player.getName()) && verifiedNoAdminIps.get(player.getName()).contains(FUtil.getIp(player));
|
||||
// Fix of issue FS-33
|
||||
return !verifiedNoAdmin.contains(player.getName()) || verifiedNoAdminIps.containsKey(player.getName()) && !verifiedNoAdminIps.get(player.getName()).contains(FUtil.getIp(player));
|
||||
}
|
||||
|
||||
public boolean isIdentityMatched(Player player)
|
||||
|
@ -7,7 +7,7 @@ public enum TimeUnit
|
||||
HOUR(MINUTE.get() * 60L),
|
||||
DAY(HOUR.get() * 24L),
|
||||
WEEK(DAY.get() * 7L),
|
||||
MONTH(WEEK.get() * 4L),
|
||||
MONTH(DAY.get() * 30L),
|
||||
YEAR(MONTH.get() * 12L);
|
||||
|
||||
private final long time;
|
||||
|
Reference in New Issue
Block a user