public void forceUnloadWorld(World world) { world.setAutoSave(false); for ( Player player : world.getPlayers() ) player.kickPlayer("World is being deleted... and you were in it!"); // formerly used server.unloadWorld at this point. But it was sometimes failing, even when I force-cleared the player list CraftServer server = (CraftServer)plugin.getServer(); CraftWorld craftWorld = (CraftWorld)world; try { Field f = server.getClass().getDeclaredField("worlds"); f.setAccessible(true); @SuppressWarnings("unchecked") Map worlds = (Map)f.get(server); worlds.remove(world.getName().toLowerCase()); f.setAccessible(false); } catch ( IllegalAccessException ex ) { } catch ( NoSuchFieldException ex ) { } MinecraftServer ms = getMinecraftServer(); ms.worlds.remove(ms.worlds.indexOf(craftWorld.getHandle())); }