Mirror von
https://github.com/PaperMC/Paper.git
synchronisiert 2024-11-16 04:50:05 +01:00
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.
Dieser Commit ist enthalten in:
Ursprung
84237bb783
Commit
7aabcb2ab3
@ -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"));
|
||||
|
@ -730,7 +730,6 @@ public final class CraftServer implements Server {
|
||||
return null;
|
||||
}
|
||||
|
||||
internal.worldMaps = console.worlds.get(0).worldMaps;
|
||||
internal.scoreboard = getScoreboardManager().getMainScoreboard().getHandle();
|
||||
|
||||
internal.tracker = new EntityTracker(internal);
|
||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren