diff --git a/PlotSquared/src/main/java/com/intellectualcrafters/plot/PlotMain.java b/PlotSquared/src/main/java/com/intellectualcrafters/plot/PlotMain.java index ed4e099b3..7deda77a4 100644 --- a/PlotSquared/src/main/java/com/intellectualcrafters/plot/PlotMain.java +++ b/PlotSquared/src/main/java/com/intellectualcrafters/plot/PlotMain.java @@ -862,7 +862,7 @@ public class PlotMain extends JavaPlugin implements Listener { Settings.MAX_PLOTS = config.getInt("max_plots"); Settings.SCHEMATIC_SAVE_PATH = config.getString("schematics.save_path"); - Settings.OFFLINE_MODE = config.getBoolean("uuid.offline"); + Settings.OFFLINE_MODE = config.getBoolean("UUID.offline"); Settings.UUID_FROM_DISK = config.getBoolean("uuid.read-from-disk"); Settings.REQUIRE_SELECTION = config.getBoolean("worldedit.require-selection-in-mask"); diff --git a/PlotSquared/src/main/java/com/intellectualcrafters/plot/util/ExpireManager.java b/PlotSquared/src/main/java/com/intellectualcrafters/plot/util/ExpireManager.java index 47bca3498..702220d2f 100644 --- a/PlotSquared/src/main/java/com/intellectualcrafters/plot/util/ExpireManager.java +++ b/PlotSquared/src/main/java/com/intellectualcrafters/plot/util/ExpireManager.java @@ -112,15 +112,17 @@ public class ExpireManager { } public static boolean isExpired(UUID uuid) { - OfflinePlayer op = UUIDHandler.uuidWrapper.getOfflinePlayer(uuid); - if (!op.hasPlayedBefore()) { - return true; - } - long last = op.getLastPlayed(); - long compared = System.currentTimeMillis() - last; - if (compared >= 86400000 * Settings.AUTO_CLEAR_DAYS) { - return true; - } + String name = UUIDHandler.getName(uuid); + if (name != null) { + OfflinePlayer op = Bukkit.getOfflinePlayer(name); + if (op.hasPlayedBefore()) { + long last = op.getLastPlayed(); + long compared = System.currentTimeMillis() - last; + if (compared >= 86400000 * Settings.AUTO_CLEAR_DAYS) { + return true; + } + } + } return false; }