From eeea1f2d2d383da623874a458df60f98fc2eddeb Mon Sep 17 00:00:00 2001 From: boy0001 Date: Sat, 6 Jun 2015 02:04:36 +1000 Subject: [PATCH] Fixed no plots on reload --- .../main/java/com/intellectualcrafters/plot/BukkitMain.java | 5 +++++ .../main/java/com/intellectualcrafters/plot/PlotSquared.java | 5 +++++ .../com/intellectualcrafters/plot/util/bukkit/SetGenCB.java | 2 +- 3 files changed, 11 insertions(+), 1 deletion(-) diff --git a/PlotSquared/src/main/java/com/intellectualcrafters/plot/BukkitMain.java b/PlotSquared/src/main/java/com/intellectualcrafters/plot/BukkitMain.java index dd0021894..5da77f917 100644 --- a/PlotSquared/src/main/java/com/intellectualcrafters/plot/BukkitMain.java +++ b/PlotSquared/src/main/java/com/intellectualcrafters/plot/BukkitMain.java @@ -2,8 +2,10 @@ package com.intellectualcrafters.plot; import java.io.File; import java.util.Arrays; +import java.util.HashMap; import java.util.List; import java.util.UUID; +import java.util.Map.Entry; import org.bukkit.Bukkit; import org.bukkit.ChatColor; @@ -78,6 +80,7 @@ import com.intellectualcrafters.plot.commands.list; import com.intellectualcrafters.plot.commands.plugin; import com.intellectualcrafters.plot.config.C; import com.intellectualcrafters.plot.config.Settings; +import com.intellectualcrafters.plot.database.DBFunc; import com.intellectualcrafters.plot.database.plotme.ClassicPlotMeConnector; import com.intellectualcrafters.plot.database.plotme.LikePlotMeConverter; import com.intellectualcrafters.plot.flag.FlagManager; @@ -97,6 +100,8 @@ import com.intellectualcrafters.plot.listeners.TNTListener; import com.intellectualcrafters.plot.listeners.WorldEvents; import com.intellectualcrafters.plot.listeners.worldedit.WEListener; import com.intellectualcrafters.plot.listeners.worldedit.WESubscriber; +import com.intellectualcrafters.plot.object.Plot; +import com.intellectualcrafters.plot.object.PlotId; import com.intellectualcrafters.plot.object.PlotPlayer; import com.intellectualcrafters.plot.titles.AbstractTitle; import com.intellectualcrafters.plot.titles.DefaultTitle; diff --git a/PlotSquared/src/main/java/com/intellectualcrafters/plot/PlotSquared.java b/PlotSquared/src/main/java/com/intellectualcrafters/plot/PlotSquared.java index dd71fd130..be8219a80 100644 --- a/PlotSquared/src/main/java/com/intellectualcrafters/plot/PlotSquared.java +++ b/PlotSquared/src/main/java/com/intellectualcrafters/plot/PlotSquared.java @@ -130,6 +130,11 @@ public class PlotSquared { plotmanagers.remove(world); plotworlds.remove(world); } + + public static void removePlotWorldAbs(final String world) { + plotmanagers.remove(world); + plotworlds.remove(world); + } public static HashMap> getAllPlotsRaw() { return plots; diff --git a/PlotSquared/src/main/java/com/intellectualcrafters/plot/util/bukkit/SetGenCB.java b/PlotSquared/src/main/java/com/intellectualcrafters/plot/util/bukkit/SetGenCB.java index c8612be3f..f71933939 100644 --- a/PlotSquared/src/main/java/com/intellectualcrafters/plot/util/bukkit/SetGenCB.java +++ b/PlotSquared/src/main/java/com/intellectualcrafters/plot/util/bukkit/SetGenCB.java @@ -16,7 +16,7 @@ import com.intellectualcrafters.plot.util.SetupUtils; public class SetGenCB { public static void setGenerator(World world) throws Exception { SetupUtils.manager.updateGenerators(); - PlotSquared.removePlotWorld(world.getName()); + PlotSquared.removePlotWorldAbs(world.getName()); ChunkGenerator gen = world.getGenerator(); if (gen == null) { return;