mirror of
https://github.com/LuckPerms/LuckPerms.git
synced 2024-11-03 17:39:31 +01:00
Add rewrite rule in legacy importer for for switchprimarygroup command (#1922)
This commit is contained in:
parent
c454d17826
commit
b73b73e221
@ -242,6 +242,14 @@ public class LegacyImporter implements Runnable {
|
||||
|
||||
try {
|
||||
List<String> args = CommandManager.stripQuotes(ARGUMENT_SPLITTER.splitToList(getCommand()));
|
||||
|
||||
// rewrite rule for switchprimarygroup command
|
||||
if (args.size() >= 3 && args.get(0).equals("user") && args.get(2).equals("switchprimarygroup")) {
|
||||
args.remove(2);
|
||||
args.add(2, "parent");
|
||||
args.add(3, "switchprimarygroup");
|
||||
}
|
||||
|
||||
CommandResult result = this.commandManager.onCommand(this, "lp", args, Runnable::run).get();
|
||||
setResult(result);
|
||||
} catch (Exception e) {
|
||||
|
Loading…
Reference in New Issue
Block a user