diff options
author | Wesley Wolfe <weswolf@aol.com> | 2013-10-30 04:22:00 -0500 |
---|---|---|
committer | Wesley Wolfe <weswolf@aol.com> | 2013-10-30 04:22:00 -0500 |
commit | 7aabcb2ab3cfeb6d98ecbd8bc14cc5fad6ffa345 (patch) | |
tree | 4d291e53ba5c9b6eb631d66f960aff9355d8b010 /src/main/java/net/minecraft/server | |
parent | 84237bb783a08e330ba6539fe98c87681f7dda63 (diff) | |
download | craftbukkit-7aabcb2ab3cfeb6d98ecbd8bc14cc5fad6ffa345.tar craftbukkit-7aabcb2ab3cfeb6d98ecbd8bc14cc5fad6ffa345.tar.gz craftbukkit-7aabcb2ab3cfeb6d98ecbd8bc14cc5fad6ffa345.tar.lz craftbukkit-7aabcb2ab3cfeb6d98ecbd8bc14cc5fad6ffa345.tar.xz craftbukkit-7aabcb2ab3cfeb6d98ecbd8bc14cc5fad6ffa345.zip |
Don't share WorldMapCollection. Fixes BUKKIT-4871
WorldMapCollection stores scoreboard, map (item), structure, and
village information. Scoreboards are explicitly handled globally,
while villages and structures are erroneously shared.
This commit separates the WorldMapCollections to not be shared among
custom worlds. Maps are special-cased to maintain the previous shared
behavior.
Diffstat (limited to 'src/main/java/net/minecraft/server')
-rw-r--r-- | src/main/java/net/minecraft/server/ItemWorldMap.java | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/main/java/net/minecraft/server/ItemWorldMap.java b/src/main/java/net/minecraft/server/ItemWorldMap.java index cf6ebd11..be1b13a6 100644 --- a/src/main/java/net/minecraft/server/ItemWorldMap.java +++ b/src/main/java/net/minecraft/server/ItemWorldMap.java @@ -14,7 +14,7 @@ public class ItemWorldMap extends ItemWorldMapBase { public WorldMap getSavedMap(ItemStack itemstack, World world) { String s = "map_" + itemstack.getData(); - WorldMap worldmap = (WorldMap) world.a(WorldMap.class, s); + WorldMap worldmap = (WorldMap) world.getServer().getServer().worlds.get(0).a(WorldMap.class, s); // CraftBukkit - use primary world for maps if (worldmap == null && !world.isStatic) { itemstack.setData(world.b("map")); |