1
0
mirror of https://github.com/lucko/LuckPerms.git synced 2025-09-03 11:22:33 +02:00

Make console detection more resilient against spoofed UUIDs

This commit is contained in:
Luck
2021-03-13 14:25:33 +00:00
parent 53bb61f9b2
commit e3138eb94c
12 changed files with 55 additions and 11 deletions

View File

@@ -26,6 +26,7 @@
package me.lucko.luckperms.velocity;
import com.velocitypowered.api.command.CommandSource;
import com.velocitypowered.api.proxy.ConsoleCommandSource;
import com.velocitypowered.api.proxy.Player;
import me.lucko.luckperms.common.locale.TranslationManager;
@@ -85,4 +86,9 @@ public class VelocitySenderFactory extends SenderFactory<LPVelocityPlugin, Comma
protected void performCommand(CommandSource source, String command) {
getPlugin().getBootstrap().getProxy().getCommandManager().executeAsync(source, command).join();
}
@Override
protected boolean isConsole(CommandSource sender) {
return sender instanceof ConsoleCommandSource;
}
}