Fix reflection in PaperBrigadier

This commit is contained in:
Marc Baloup 2024-07-10 01:15:01 +02:00
parent 76470b963e
commit 4f55890092

View File

@ -14,7 +14,7 @@ import static fr.pandacube.lib.util.ThrowableUtil.wrapReflectEx;
public class PaperBrigadier extends ReflectWrapperTyped<LiteralCommandNode<CommandSourceStack>> { public class PaperBrigadier extends ReflectWrapperTyped<LiteralCommandNode<CommandSourceStack>> {
public static final ReflectClass<?> REFLECT = wrapEx(() -> Reflect.ofClass("io.papermc.paper.command.brigadier.PaperBrigadier")); public static final ReflectClass<?> REFLECT = wrapEx(() -> Reflect.ofClass("io.papermc.paper.command.brigadier.PaperBrigadier"));
private static final ReflectMethod<?> wrapNode = wrapEx(() -> REFLECT.method("wrapNode")); private static final ReflectMethod<?> wrapNode = wrapEx(() -> REFLECT.method("wrapNode", CommandNode.class));
public static Command wrapNode(CommandNode<CommandSourceStack> node) { public static Command wrapNode(CommandNode<CommandSourceStack> node) {