diff --git a/.idea/codeStyles/Project.xml b/.idea/codeStyles/Project.xml deleted file mode 100644 index 9898a0e5..00000000 --- a/.idea/codeStyles/Project.xml +++ /dev/null @@ -1,28 +0,0 @@ - - - - - - - - - \ No newline at end of file diff --git a/.idea/codeStyles/codeStyleConfig.xml b/.idea/codeStyles/codeStyleConfig.xml deleted file mode 100644 index 0f7bc519..00000000 --- a/.idea/codeStyles/codeStyleConfig.xml +++ /dev/null @@ -1,5 +0,0 @@ - - - - diff --git a/.idea/compiler.xml b/.idea/compiler.xml deleted file mode 100644 index 58d3e434..00000000 --- a/.idea/compiler.xml +++ /dev/null @@ -1,17 +0,0 @@ - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/.idea/encodings.xml b/.idea/encodings.xml deleted file mode 100644 index 0400b665..00000000 --- a/.idea/encodings.xml +++ /dev/null @@ -1,8 +0,0 @@ - - - - - - - - \ No newline at end of file diff --git a/.idea/misc.xml b/.idea/misc.xml deleted file mode 100644 index be85aa37..00000000 --- a/.idea/misc.xml +++ /dev/null @@ -1,16 +0,0 @@ - - - - - - - - - - - - \ No newline at end of file diff --git a/.idea/uiDesigner.xml b/.idea/uiDesigner.xml deleted file mode 100644 index e96534fb..00000000 --- a/.idea/uiDesigner.xml +++ /dev/null @@ -1,124 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/.idea/vcs.xml b/.idea/vcs.xml deleted file mode 100644 index 35eb1ddf..00000000 --- a/.idea/vcs.xml +++ /dev/null @@ -1,6 +0,0 @@ - - - - - - \ No newline at end of file diff --git a/src/main/java/me/totalfreedom/totalfreedommod/admin/ActivityLogEntry.java b/src/main/java/me/totalfreedom/totalfreedommod/admin/ActivityLogEntry.java index d384d221..eb056fcb 100644 --- a/src/main/java/me/totalfreedom/totalfreedommod/admin/ActivityLogEntry.java +++ b/src/main/java/me/totalfreedom/totalfreedommod/admin/ActivityLogEntry.java @@ -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: ", ""); diff --git a/src/main/java/me/totalfreedom/totalfreedommod/admin/AdminList.java b/src/main/java/me/totalfreedom/totalfreedommod/admin/AdminList.java index 7ed0b9fa..c2b1f458 100644 --- a/src/main/java/me/totalfreedom/totalfreedommod/admin/AdminList.java +++ b/src/main/java/me/totalfreedom/totalfreedommod/admin/AdminList.java @@ -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)