Make auxiliary worlds use the main scoreboard. Addresses BUKKIT-3984
When a world is created using our API, it does not use secondary world server and will maintain a reference to its own scoreboard. In vanilla, this is not an issue as there is only ever one world. Similarly to maps, an overwrite to the scoreboard reference has been added for when another world has been created. This should also address BUKKIT-3982 and BUKKIT-3985
This commit is contained in:
@@ -60,7 +60,7 @@ public abstract class World implements IBlockAccess {
|
|||||||
public final MethodProfiler methodProfiler;
|
public final MethodProfiler methodProfiler;
|
||||||
private final Vec3DPool J = new Vec3DPool(300, 2000);
|
private final Vec3DPool J = new Vec3DPool(300, 2000);
|
||||||
private final Calendar K = Calendar.getInstance();
|
private final Calendar K = Calendar.getInstance();
|
||||||
protected Scoreboard scoreboard = new Scoreboard();
|
public Scoreboard scoreboard = new Scoreboard(); // CraftBukkit - protected -> public
|
||||||
private final IConsoleLogManager logAgent;
|
private final IConsoleLogManager logAgent;
|
||||||
private UnsafeList M = new UnsafeList(); // CraftBukkit - ArrayList -> UnsafeList
|
private UnsafeList M = new UnsafeList(); // CraftBukkit - ArrayList -> UnsafeList
|
||||||
private boolean N;
|
private boolean N;
|
||||||
|
|||||||
@@ -721,8 +721,9 @@ public final class CraftServer implements Server {
|
|||||||
}
|
}
|
||||||
|
|
||||||
internal.worldMaps = console.worlds.get(0).worldMaps;
|
internal.worldMaps = console.worlds.get(0).worldMaps;
|
||||||
|
internal.scoreboard = getScoreboardManager().getMainScoreboard().getHandle();
|
||||||
|
|
||||||
internal.tracker = new EntityTracker(internal); // CraftBukkit
|
internal.tracker = new EntityTracker(internal);
|
||||||
internal.addIWorldAccess(new WorldManager(console, internal));
|
internal.addIWorldAccess(new WorldManager(console, internal));
|
||||||
internal.difficulty = 1;
|
internal.difficulty = 1;
|
||||||
internal.setSpawnFlags(true, true);
|
internal.setSpawnFlags(true, true);
|
||||||
|
|||||||
Reference in New Issue
Block a user