From c7920f4302bce2042aa9c5d1d121e488cb88f7f0 Mon Sep 17 00:00:00 2001 From: md_5 Date: Sun, 21 May 2017 10:28:07 +1000 Subject: [PATCH] SPIGOT-3257: Issue with AdvancementRewards function --- nms-patches/AdvancementRewards.patch | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 nms-patches/AdvancementRewards.patch diff --git a/nms-patches/AdvancementRewards.patch b/nms-patches/AdvancementRewards.patch new file mode 100644 index 0000000000..50852ea213 --- /dev/null +++ b/nms-patches/AdvancementRewards.patch @@ -0,0 +1,20 @@ +--- a/net/minecraft/server/AdvancementRewards.java ++++ b/net/minecraft/server/AdvancementRewards.java +@@ -98,7 +98,7 @@ + } + + public boolean getSendCommandFeedback() { +- return minecraftserver.worldServer[0].getGameRules().getBoolean("commandBlockOutput"); ++ return minecraftserver.worlds.get(0).getGameRules().getBoolean("commandBlockOutput"); // CraftBukkit + } + + public void a(CommandObjectiveExecutor.EnumCommandResult commandobjectiveexecutor_enumcommandresult, int i) { +@@ -156,7 +156,7 @@ + return new AdvancementRewards(i, aminecraftkey, aminecraftkey1, customfunction_a); + } + +- public Object deserialize(JsonElement jsonelement, Type type, JsonDeserializationContext jsondeserializationcontext) throws JsonParseException { ++ public AdvancementRewards deserialize(JsonElement jsonelement, Type type, JsonDeserializationContext jsondeserializationcontext) throws JsonParseException { // CraftBukkit - decompile error + return this.a(jsonelement, type, jsondeserializationcontext); + } + }