
Reset everyones rank back to default?
Closed this issue ยท 10 comments
Is there a command I can use to make set everyones group back to default? I am trying to run an economy / group reset on my server and would rather not have to manually set 100s of users ranks back :(
Yeah, this should cover what you're trying to do.
Ok, thanks! I have tried some commands but none of them seem to work. Could you please guide me to what the actual command I should run via console if I want to update all of the users groups to default? I have tried a lot like:
/lp bulkupdate users groups default
/lp bulkupdate users groups server default
and more but none of them are working. I am a bit confused on how exactly to use the bulkupdate command.
Do you want to wipe all permissions or groups/users? Or are you just trying to reset groups to default?
Your syntax is incorrect.
/lp bulkupdate [action field] [action value] [constraint...]
Make sure you read all of the information on the page Luck linked
I just want to set everyone's groups back to the default group. I want to keep all the permission for the group.
I believe default
is no group.
I haven't tested this, so make sure you back up your database before trying
/lp bulkupdate users delete permission
There's an example on that page you can use:
/lp bulkupdate users delete "permission == group.<group name>"
will delete all memberships of the given group.
Is there a way I can just update everyones group to default instead of deleting the group from them? Maybe something like:
/lp bulkupdate users update permission group.* "permission == group.default"
EDIT: I tried testing the command you gave me and for some reason it shoots me some errors:
[23:12:04] [pool-7-thread-1/INFO]: [LP] Running bulk update.
[23:12:04] [Craft Scheduler Thread - 29/WARN]: org.h2.jdbc.JdbcSQLException: Column "group.owner" not found; SQL statement:
DELETE FROM luckperms_user_permissions WHERE permission = "group.owner"; [42122-193]
[23:12:04] [Craft Scheduler Thread - 29/WARN]: at org.h2.message.DbException.getJdbcSQLException(DbException.java:345)
[23:12:04] [Craft Scheduler Thread - 29/WARN]: at org.h2.message.DbException.get(DbException.java:179)
[23:12:04] [Craft Scheduler Thread - 29/WARN]: at org.h2.message.DbException.get(DbException.java:155)
[23:12:04] [Craft Scheduler Thread - 29/WARN]: at org.h2.expression.ExpressionColumn.optimize(ExpressionColumn.java:147)
[23:12:04] [Craft Scheduler Thread - 29/WARN]: at org.h2.expression.Comparison.optimize(Comparison.java:180)
[23:12:04] [Craft Scheduler Thread - 29/WARN]: at org.h2.command.dml.Delete.prepare(Delete.java:131)
[23:12:04] [Craft Scheduler Thread - 29/WARN]: at org.h2.command.Parser.prepareCommand(Parser.java:259)
[23:12:04] [Craft Scheduler Thread - 29/WARN]: at org.h2.engine.Session.prepareLocal(Session.java:561)
[23:12:04] [Craft Scheduler Thread - 29/WARN]: at org.h2.engine.Session.prepareCommand(Session.java:502)
[23:12:04] [Craft Scheduler Thread - 29/WARN]: at org.h2.jdbc.JdbcConnection.prepareCommand(JdbcConnection.java:1203)
[23:12:04] [Craft Scheduler Thread - 29/WARN]: at org.h2.jdbc.JdbcStatement.executeInternal(JdbcStatement.java:170)
[23:12:04] [Craft Scheduler Thread - 29/WARN]: at org.h2.jdbc.JdbcStatement.execute(JdbcStatement.java:158)
[23:12:04] [Craft Scheduler Thread - 29/WARN]: at me.lucko.luckperms.common.storage.backing.SQLBacking.applyBulkUpdate(SQLBacking.java:268)
[23:12:04] [Craft Scheduler Thread - 29/WARN]: at me.lucko.luckperms.common.storage.AbstractStorage.lambda$applyBulkUpdate$1(AbstractStorage.java:100)
[23:12:04] [Craft Scheduler Thread - 29/WARN]: at java.util.concurrent.CompletableFuture$AsyncSupply.run(CompletableFuture.java:1590)
[23:12:04] [Craft Scheduler Thread - 29/WARN]: at org.bukkit.craftbukkit.v1_11_R1.scheduler.CraftTask.run(CraftTask.java:71)
[23:12:04] [Craft Scheduler Thread - 29/WARN]: at org.bukkit.craftbukkit.v1_11_R1.scheduler.CraftAsyncTask.run(CraftAsyncTask.java:52)
[23:12:04] [Craft Scheduler Thread - 29/WARN]: at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
[23:12:04] [Craft Scheduler Thread - 29/WARN]: at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
[23:12:04] [Craft Scheduler Thread - 29/WARN]: at java.lang.Thread.run(Thread.java:745)
[23:12:04] [Craft Scheduler Thread - 29/INFO]: [LP] Bulk update failed. Check the console for errors.
[23:12:04] [Craft Scheduler Thread - 28/INFO]: [Statz debug] Save Statz database.
[23:12:14] [Craft Scheduler Thread - 29/INFO]: [Statz debug] Save Statz database.
Also not sure if my database that LP is connected to should not show any luckperms_ table(s) but the only tables I have in my database are from another plugin, LuckPerms never created a table for me in the database as shown here.
EDIT 2: I changed storage type to mysql and it inserted the table(s) into my databse. I ran many bulkupdates to each and every rank changing them to group.default like so:
/lp bulkupdate users update permission group.default "permission == group.peasent"
/lp bulkupdate users update permission group.default "permission == group.laborer"
/lp bulkupdate users update permission group.default "permission == group.planter"
/lp bulkupdate users update permission group.default "permission == group.rancher"
/lp bulkupdate users update permission group.default "permission == group.sharecropper"
/lp bulkupdate users update permission group.default "permission == group.jrfarmer"
and so on for each rank... This issue is now solved!