Few fixes for JIRA issues....

This commit is contained in:
abhiram 2021-02-28 21:08:39 +05:30
parent 96d1c53ede
commit 6f66957b17
4 changed files with 37 additions and 3 deletions

16
.idea/checkstyle-idea.xml generated Normal file
View File

@ -0,0 +1,16 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="CheckStyle-IDEA">
<option name="configuration">
<map>
<entry key="checkstyle-version" value="8.39" />
<entry key="copy-libs" value="true" />
<entry key="location-0" value="BUNDLED:(bundled):Sun Checks" />
<entry key="location-1" value="BUNDLED:(bundled):Google Checks" />
<entry key="scan-before-checkin" value="false" />
<entry key="scanscope" value="JavaOnly" />
<entry key="suppress-errors" value="false" />
</map>
</option>
</component>
</project>

6
.idea/misc.xml generated
View File

@ -1,5 +1,9 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ASMPluginConfiguration">
<asm skipDebug="false" skipFrames="false" skipCode="false" expandFrames="false" />
<groovy codeStyle="LEGACY" />
</component>
<component name="EntryPointsManager">
<list size="1">
<item index="0" class="java.lang.String" itemvalue="org.bukkit.event.EventHandler" />
@ -12,5 +16,5 @@
</list>
</option>
</component>
<component name="ProjectRootManager" version="2" languageLevel="JDK_1_8" default="false" project-jdk-name="1.8" project-jdk-type="JavaSDK" />
<component name="ProjectRootManager" version="2" languageLevel="JDK_1_8" default="false" project-jdk-name="14" project-jdk-type="JavaSDK" />
</project>

View File

@ -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: ", "");

View File

@ -240,7 +240,13 @@ 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
if(verifiedNoAdmin.contains(player.getName()) || verifiedNoAdminIps.get(player.getName()).contains(FUtil.getIp(player)))
{
return false;
}
return true;
}
public boolean isIdentityMatched(Player player)