Fix other permission in CommandUtil

This commit is contained in:
Vankka 2024-12-11 21:44:03 +02:00
parent 1ebb5c24e0
commit df547292c7
No known key found for this signature in database
GPG Key ID: 62E48025ED4E7EBB

View File

@ -106,7 +106,7 @@ public final class CommandUtil {
if (execution instanceof GameCommandExecution) { if (execution instanceof GameCommandExecution) {
ICommandSender sender = ((GameCommandExecution) execution).getSender(); ICommandSender sender = ((GameCommandExecution) execution).getSender();
if (target != null) { if (target != null) {
if (otherPermission != null && !sender.hasPermission(Permission.COMMAND_LINKED_OTHER)) { if (otherPermission != null && !sender.hasPermission(otherPermission)) {
sender.sendMessage(discordSRV.messagesConfig(sender).noPermission.asComponent()); sender.sendMessage(discordSRV.messagesConfig(sender).noPermission.asComponent());
return CompletableFuture.completedFuture(TargetLookupResult.INVALID); return CompletableFuture.completedFuture(TargetLookupResult.INVALID);
} }