mirror of
https://github.com/LuckPerms/LuckPerms.git
synced 2024-09-30 22:37:33 +02: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.
|
# - If automation is needed, users should prefer using the LuckPerms API.
|
||||||
skip-bulkupdate-confirmation: false
|
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.
|
# 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.
|
# - 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.
|
# - If automation is needed, users should prefer using the LuckPerms API.
|
||||||
skip-bulkupdate-confirmation: false
|
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.
|
# 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.
|
# - When this happens, the plugin will set their primary group back to default.
|
||||||
|
@ -64,6 +64,11 @@ public class BulkUpdateCommand extends SingleCommand {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void execute(LuckPermsPlugin plugin, Sender sender, ArgumentList args, String label) throws CommandException {
|
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()) {
|
if (!sender.isConsole()) {
|
||||||
Message.BULK_UPDATE_MUST_USE_CONSOLE.send(sender);
|
Message.BULK_UPDATE_MUST_USE_CONSOLE.send(sender);
|
||||||
return;
|
return;
|
||||||
|
@ -164,6 +164,11 @@ public final class ConfigKeys {
|
|||||||
*/
|
*/
|
||||||
public static final ConfigKey<Boolean> SKIP_BULKUPDATE_CONFIRMATION = booleanKey("skip-bulkupdate-confirmation", false);
|
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.
|
* If LuckPerms should produce extra logging output when it handles logins.
|
||||||
*/
|
*/
|
||||||
|
@ -2662,6 +2662,13 @@ public interface Message {
|
|||||||
.append(FULL_STOP)
|
.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()
|
Args0 BULK_UPDATE_MUST_USE_CONSOLE = () -> prefixed(translatable()
|
||||||
// "&cThe bulk update command can only be used from the console."
|
// "&cThe bulk update command can only be used from the console."
|
||||||
.key("luckperms.command.bulkupdate.must-use-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.starting=Starting import process
|
||||||
luckperms.command.import.completed=COMPLETED
|
luckperms.command.import.completed=COMPLETED
|
||||||
luckperms.command.import.duration=took {0} seconds
|
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.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-data-type=Invalid type, was expecting {0}
|
||||||
luckperms.command.bulkupdate.invalid-constraint=Invalid constraint {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.
|
# - If automation is needed, users should prefer using the LuckPerms API.
|
||||||
skip-bulkupdate-confirmation = false
|
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.
|
# 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.
|
# - 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.
|
# - If automation is needed, users should prefer using the LuckPerms API.
|
||||||
skip-bulkupdate-confirmation: false
|
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.
|
# 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.
|
# - 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.
|
# - If automation is needed, users should prefer using the LuckPerms API.
|
||||||
skip-bulkupdate-confirmation = false
|
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.
|
# 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.
|
# - 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.
|
# - If automation is needed, users should prefer using the LuckPerms API.
|
||||||
skip-bulkupdate-confirmation: false
|
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.
|
# 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.
|
# - When this happens, the plugin will set their primary group back to default.
|
||||||
|
Loading…
Reference in New Issue
Block a user