-
-
Notifications
You must be signed in to change notification settings - Fork 216
Open
Labels
status: needs triageThis label is automatically applied to new issues and pull requests to indicate they require triageThis label is automatically applied to new issues and pull requests to indicate they require triagetype: bugSomething isn't workingSomething isn't working
Description
Affected Product(s)
SpongeNeo
Version
1.21.1-21.1.35-12.0.3-RC2358
Operating System
Debian GNU/Linux 12 (bookworm) x86_64
Java Version
21.0.7
Plugins/Mods
Plugins (12): LogFilter, WorldEdit, LocaleAPI, Wasted, LuckPerms, H2Driver, MySQLDriver, CommandPack, RegionGuard, GuiShopManager, IslandWorlds, ClearLag.
Mods (12): Minecraft, Just Enough Items, Lithium, SpongeAPI, Sponge, NeoForge, SpongeNeo, ModernFix, Architectury, Accelerated Decay, Ferrite Core, AI-Improvements.Describe the bug
The bug is not reproducible on SpongeVanilla.
You can check using this code. In the constructor of the command, use the method executionRequirements(cause -> ...).
boolean canUse(CommandCause cause) {
return cause.first(ServerPlayer.class).filter(player -> hasPermission(player)).isPresent();
// | ^ Optional is always empty here |
}
// This method will never be called.
boolean hasPermission(ServerPlayer player) {
return player.hasPermission("permission");
}That's what we get as a result. The player can execute a command if he has permission, but the client will always highlight it in red, since he does not know it, which means that tab-completion of the command and its arguments will not work.
Link to logs
No response
LemonNick
Metadata
Metadata
Assignees
Labels
status: needs triageThis label is automatically applied to new issues and pull requests to indicate they require triageThis label is automatically applied to new issues and pull requests to indicate they require triagetype: bugSomething isn't workingSomething isn't working