From 178caf9ac289d9e9d274e6ba421ea390bc5755b0 Mon Sep 17 00:00:00 2001 From: md_5 Date: Wed, 6 Sep 2017 16:07:41 +1000 Subject: [PATCH] SPIGOT-3551: Recursively unrestrict advancements --- src/main/java/org/bukkit/craftbukkit/CraftServer.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java index 1564dd717a..9f404c1a45 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java @@ -262,6 +262,10 @@ public final class CraftServer implements Server { } public boolean getPermissionOverride(ICommandListener listener) { + while (listener instanceof CommandListenerWrapper) { + listener = ((CommandListenerWrapper) listener).base; + } + return unrestrictedAdvancements && listener instanceof AdvancementRewards.AdvancementCommandListener; }