From aff3e6a8c7bfc27b3252f5de929f5d250c967254 Mon Sep 17 00:00:00 2001 From: mohammed Alteneiji Date: Sat, 4 May 2024 22:35:52 +0400 Subject: [PATCH] fix Velocity root command not checking for permissions correctly (#406) --- .../src/main/java/co/aikar/commands/VelocityRootCommand.java | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/velocity/src/main/java/co/aikar/commands/VelocityRootCommand.java b/velocity/src/main/java/co/aikar/commands/VelocityRootCommand.java index 13e746438..8dc90f956 100644 --- a/velocity/src/main/java/co/aikar/commands/VelocityRootCommand.java +++ b/velocity/src/main/java/co/aikar/commands/VelocityRootCommand.java @@ -94,4 +94,9 @@ public List suggest(Invocation invocation) { public CompletableFuture> suggestAsync(Invocation invocation) { return CompletableFuture.completedFuture(getTabCompletions(manager.getCommandIssuer(invocation.source()), getCommandName(), invocation.arguments())); } + + @Override + public boolean hasPermission(Invocation invocation) { + return hasAnyPermission(this.manager.getCommandIssuer(invocation.source())); + } }