Config option for registering brigadier command list data

This commit is contained in:
Luck 2020-08-30 09:13:59 +01:00
parent 8d9b4182f4
commit cc1d8984da
No known key found for this signature in database
GPG Key ID: EFA9B3EC5FD90F8B
3 changed files with 9 additions and 1 deletions

View File

@ -158,7 +158,7 @@ public class LPBukkitPlugin extends AbstractLuckPermsPlugin {
this.commandManager.register();
// setup brigadier
if (isBrigadierSupported()) {
if (isBrigadierSupported() && getConfiguration().get(ConfigKeys.REGISTER_COMMAND_LIST_DATA)) {
try {
LuckPermsBrigadier.register(this, command);
} catch (Exception e) {

View File

@ -626,6 +626,9 @@ prevent-primary-group-removal: false
# If LuckPerms should update the list of commands sent to the client when permissions are changed.
update-client-command-list: true
# If LuckPerms should attempt to register "Brigadier" command list data for its commands.
register-command-list-data: true
# If LuckPerms should attempt to resolve Vanilla command target selectors for LP commands.
# See here for more info: https://minecraft.gamepedia.com/Commands#Target_selectors
resolve-command-selectors: false

View File

@ -154,6 +154,11 @@ public final class ConfigKeys {
*/
public static final ConfigKey<Boolean> UPDATE_CLIENT_COMMAND_LIST = notReloadable(booleanKey("update-client-command-list", true));
/**
* If LuckPerms should attempt to register "Brigadier" command list data for its commands.
*/
public static final ConfigKey<Boolean> REGISTER_COMMAND_LIST_DATA = notReloadable(booleanKey("register-command-list-data", true));
/**
* If LuckPerms should attempt to resolve Vanilla command target selectors for LP commands.
*/