diff --git a/src/main/java/com/graywolf336/jail/JailStickManager.java b/src/main/java/com/graywolf336/jail/JailStickManager.java index 392ca1e..3405136 100644 --- a/src/main/java/com/graywolf336/jail/JailStickManager.java +++ b/src/main/java/com/graywolf336/jail/JailStickManager.java @@ -2,6 +2,7 @@ package com.graywolf336.jail; import java.util.ArrayList; import java.util.HashMap; +import java.util.Map.Entry; import org.bukkit.Material; import org.bukkit.configuration.file.FileConfiguration; @@ -32,8 +33,15 @@ public class JailStickManager { private void loadJailSticks(JailMain pl) { FileConfiguration config = pl.getConfig(); + if(pl.inDebug()) { + for(Entry s : sticks.entrySet()) { + pl.debug(s.getKey().toString().toLowerCase() + "," + s.getValue().toString()); + } + } + //item name,time,jail name,reason for(String s : config.getStringList(Settings.JAILSTICKSTICKS.getPath())) { + pl.debug(s); String[] a = s.split(","); //Check if the jail given, if any, exists diff --git a/src/main/java/com/graywolf336/jail/beans/Stick.java b/src/main/java/com/graywolf336/jail/beans/Stick.java index 0876097..bebc578 100644 --- a/src/main/java/com/graywolf336/jail/beans/Stick.java +++ b/src/main/java/com/graywolf336/jail/beans/Stick.java @@ -4,7 +4,7 @@ package com.graywolf336.jail.beans; * Represents a Jail Stick, contains all the information. * * @author graywolf336 - * @version 1.0.0 + * @version 1.0.1 * @since 3.0.0 * */ @@ -29,4 +29,9 @@ public class Stick { public long getTime() { return this.time; } + + @Override + public String toString() { + return time + "," + jail + "," + reason; + } } diff --git a/src/main/java/com/graywolf336/jail/legacy/LegacyManager.java b/src/main/java/com/graywolf336/jail/legacy/LegacyManager.java index db45c9e..31e2ca3 100644 --- a/src/main/java/com/graywolf336/jail/legacy/LegacyManager.java +++ b/src/main/java/com/graywolf336/jail/legacy/LegacyManager.java @@ -62,12 +62,11 @@ public class LegacyManager { try { loadOldConfig(); + return true; }catch (Exception e) { pl.getLogger().severe("Failed to load the old configuration for some reason."); return false; } - - return false; } @SuppressWarnings("deprecation")