From a7d074c6c0842d716387c7516720208c4afe5755 Mon Sep 17 00:00:00 2001 From: md_5 Date: Thu, 15 Jun 2017 20:34:19 +1000 Subject: [PATCH] SPIGOT-3329: Allow per world loot tables --- nms-patches/WorldServer.patch | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/nms-patches/WorldServer.patch b/nms-patches/WorldServer.patch index 844080d5db..57a5ae8568 100644 --- a/nms-patches/WorldServer.patch +++ b/nms-patches/WorldServer.patch @@ -67,17 +67,16 @@ persistentscoreboard.a(this.scoreboard); ((ScoreboardServer) this.scoreboard).a((Runnable) (new RunnableSaveScoreboard(persistentscoreboard))); -- this.B = new LootTableRegistry(new File(new File(this.dataManager.getDirectory(), "data"), "loot_tables")); -- this.C = new AdvancementDataWorld(new File(new File(this.dataManager.getDirectory(), "data"), "advancements")); -- this.D = new CustomFunctionData(new File(new File(this.dataManager.getDirectory(), "data"), "functions"), this.server); + // CraftBukkit start + } else { + this.scoreboard = getServer().getScoreboardManager().getMainScoreboard().getHandle(); + } ++ // CraftBukkit end + -+ if (this.B == null) { -+ this.B = new LootTableRegistry(new File(new File(this.dataManager.getDirectory(), "data"), "loot_tables")); -+ } + this.B = new LootTableRegistry(new File(new File(this.dataManager.getDirectory(), "data"), "loot_tables")); +- this.C = new AdvancementDataWorld(new File(new File(this.dataManager.getDirectory(), "data"), "advancements")); +- this.D = new CustomFunctionData(new File(new File(this.dataManager.getDirectory(), "data"), "functions"), this.server); ++ // CraftBukkit start + if (this.C == null) { + this.C = new AdvancementDataWorld(new File(new File(this.dataManager.getDirectory(), "data"), "advancements")); + }