From fcbfbae02ed09d131788023205e495a2ae3d24f1 Mon Sep 17 00:00:00 2001 From: boy0001 Date: Sun, 22 Mar 2015 22:43:46 +1100 Subject: [PATCH] Fixes #214 --- .../java/com/intellectualcrafters/plot/BukkitMain.java | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/PlotSquared/src/main/java/com/intellectualcrafters/plot/BukkitMain.java b/PlotSquared/src/main/java/com/intellectualcrafters/plot/BukkitMain.java index c9ca0e064..839cd4079 100644 --- a/PlotSquared/src/main/java/com/intellectualcrafters/plot/BukkitMain.java +++ b/PlotSquared/src/main/java/com/intellectualcrafters/plot/BukkitMain.java @@ -2,6 +2,7 @@ package com.intellectualcrafters.plot; import java.io.File; import java.util.Arrays; +import java.util.List; import net.milkbowl.vault.economy.Economy; @@ -36,6 +37,7 @@ import com.intellectualcrafters.plot.listeners.PlayerEvents_1_8; import com.intellectualcrafters.plot.listeners.PlotPlusListener; import com.intellectualcrafters.plot.listeners.WorldEditListener; import com.intellectualcrafters.plot.listeners.WorldEvents; +import com.intellectualcrafters.plot.object.PlotGenerator; import com.intellectualcrafters.plot.titles.AbstractTitle; import com.intellectualcrafters.plot.titles.DefaultTitle; import com.intellectualcrafters.plot.util.BlockManager; @@ -101,6 +103,13 @@ public class BukkitMain extends JavaPlugin implements Listener, IPlotMain { log("&dUsing metrics will allow us to improve the plugin, please consider it :)"); } getServer().getPluginManager().registerEvents(new WorldEvents(), this); + List worlds = Bukkit.getWorlds(); + if (worlds.size() > 0) { + UUIDHandler.cacheAll(worlds.get(0).getName()); + for (World world : worlds) { + Bukkit.getServer().unloadWorld(world, true); + } + } } @Override