mirror of
https://github.com/LuckPerms/LuckPerms.git
synced 2025-02-06 07:31:23 +01:00
Add config option to disable bulkupdate functionality
This commit is contained in:
parent
9c0874162b
commit
8cc126f711
@ -687,6 +687,12 @@ allow-invalid-usernames: false
|
||||
# - If automation is needed, users should prefer using the LuckPerms API.
|
||||
skip-bulkupdate-confirmation: false
|
||||
|
||||
# If LuckPerms should prevent bulkupdate operations.
|
||||
#
|
||||
# - When set to true, bulkupdate operations (the /lp bulkupdate command) will not work.
|
||||
# - When set to false, bulkupdate operations will be allowed via the console.
|
||||
disable-bulkupdate: false
|
||||
|
||||
# If LuckPerms should allow a users primary group to be removed with the 'parent remove' command.
|
||||
#
|
||||
# - When this happens, the plugin will set their primary group back to default.
|
||||
|
@ -589,6 +589,12 @@ allow-invalid-usernames: false
|
||||
# - If automation is needed, users should prefer using the LuckPerms API.
|
||||
skip-bulkupdate-confirmation: false
|
||||
|
||||
# If LuckPerms should prevent bulkupdate operations.
|
||||
#
|
||||
# - When set to true, bulkupdate operations (the /lp bulkupdate command) will not work.
|
||||
# - When set to false, bulkupdate operations will be allowed via the console.
|
||||
disable-bulkupdate: false
|
||||
|
||||
# If LuckPerms should allow a users primary group to be removed with the 'parent remove' command.
|
||||
#
|
||||
# - When this happens, the plugin will set their primary group back to default.
|
||||
|
@ -64,6 +64,11 @@ public class BulkUpdateCommand extends SingleCommand {
|
||||
|
||||
@Override
|
||||
public void execute(LuckPermsPlugin plugin, Sender sender, ArgumentList args, String label) throws CommandException {
|
||||
if (plugin.getConfiguration().get(ConfigKeys.DISABLE_BULKUPDATE)) {
|
||||
Message.BULK_UPDATE_DISABLED.send(sender);
|
||||
return;
|
||||
}
|
||||
|
||||
if (!sender.isConsole()) {
|
||||
Message.BULK_UPDATE_MUST_USE_CONSOLE.send(sender);
|
||||
return;
|
||||
|
@ -164,6 +164,11 @@ public final class ConfigKeys {
|
||||
*/
|
||||
public static final ConfigKey<Boolean> SKIP_BULKUPDATE_CONFIRMATION = booleanKey("skip-bulkupdate-confirmation", false);
|
||||
|
||||
/**
|
||||
* If LuckPerms should prevent bulkupdate operations.
|
||||
*/
|
||||
public static final ConfigKey<Boolean> DISABLE_BULKUPDATE = booleanKey("disable-bulkupdate", false);
|
||||
|
||||
/**
|
||||
* If LuckPerms should produce extra logging output when it handles logins.
|
||||
*/
|
||||
|
@ -2662,6 +2662,13 @@ public interface Message {
|
||||
.append(FULL_STOP)
|
||||
);
|
||||
|
||||
Args0 BULK_UPDATE_DISABLED = () -> prefixed(translatable()
|
||||
// "&cBulk update functionality is disabled in the configuration file."
|
||||
.key("luckperms.command.bulkupdate.disabled")
|
||||
.color(RED)
|
||||
.append(FULL_STOP)
|
||||
);
|
||||
|
||||
Args0 BULK_UPDATE_MUST_USE_CONSOLE = () -> prefixed(translatable()
|
||||
// "&cThe bulk update command can only be used from the console."
|
||||
.key("luckperms.command.bulkupdate.must-use-console")
|
||||
|
@ -324,6 +324,7 @@ luckperms.command.import.progress.operations={0}/{1} operations complete
|
||||
luckperms.command.import.starting=Starting import process
|
||||
luckperms.command.import.completed=COMPLETED
|
||||
luckperms.command.import.duration=took {0} seconds
|
||||
luckperms.command.bulkupdate.disabled=Bulk update functionality is disabled in the configuration file
|
||||
luckperms.command.bulkupdate.must-use-console=The bulk update command can only be used from the console
|
||||
luckperms.command.bulkupdate.invalid-data-type=Invalid type, was expecting {0}
|
||||
luckperms.command.bulkupdate.invalid-constraint=Invalid constraint {0}
|
||||
|
@ -620,6 +620,12 @@ allow-invalid-usernames = false
|
||||
# - If automation is needed, users should prefer using the LuckPerms API.
|
||||
skip-bulkupdate-confirmation = false
|
||||
|
||||
# If LuckPerms should prevent bulkupdate operations.
|
||||
#
|
||||
# - When set to true, bulkupdate operations (the /lp bulkupdate command) will not work.
|
||||
# - When set to false, bulkupdate operations will be allowed via the console.
|
||||
disable-bulkupdate = false
|
||||
|
||||
# If LuckPerms should allow a users primary group to be removed with the 'parent remove' command.
|
||||
#
|
||||
# - When this happens, the plugin will set their primary group back to default.
|
||||
|
@ -631,6 +631,12 @@ allow-invalid-usernames: true
|
||||
# - If automation is needed, users should prefer using the LuckPerms API.
|
||||
skip-bulkupdate-confirmation: false
|
||||
|
||||
# If LuckPerms should prevent bulkupdate operations.
|
||||
#
|
||||
# - When set to true, bulkupdate operations (the /lp bulkupdate command) will not work.
|
||||
# - When set to false, bulkupdate operations will be allowed via the console.
|
||||
disable-bulkupdate: false
|
||||
|
||||
# If LuckPerms should allow a users primary group to be removed with the 'parent remove' command.
|
||||
#
|
||||
# - When this happens, the plugin will set their primary group back to default.
|
||||
|
@ -607,6 +607,12 @@ allow-invalid-usernames = false
|
||||
# - If automation is needed, users should prefer using the LuckPerms API.
|
||||
skip-bulkupdate-confirmation = false
|
||||
|
||||
# If LuckPerms should prevent bulkupdate operations.
|
||||
#
|
||||
# - When set to true, bulkupdate operations (the /lp bulkupdate command) will not work.
|
||||
# - When set to false, bulkupdate operations will be allowed via the console.
|
||||
disable-bulkupdate = false
|
||||
|
||||
# If LuckPerms should allow a users primary group to be removed with the 'parent remove' command.
|
||||
#
|
||||
# - When this happens, the plugin will set their primary group back to default.
|
||||
|
@ -575,6 +575,12 @@ allow-invalid-usernames: false
|
||||
# - If automation is needed, users should prefer using the LuckPerms API.
|
||||
skip-bulkupdate-confirmation: false
|
||||
|
||||
# If LuckPerms should prevent bulkupdate operations.
|
||||
#
|
||||
# - When set to true, bulkupdate operations (the /lp bulkupdate command) will not work.
|
||||
# - When set to false, bulkupdate operations will be allowed via the console.
|
||||
disable-bulkupdate: false
|
||||
|
||||
# If LuckPerms should allow a users primary group to be removed with the 'parent remove' command.
|
||||
#
|
||||
# - When this happens, the plugin will set their primary group back to default.
|
||||
|
Loading…
Reference in New Issue
Block a user