mirror of
https://github.com/LuckPerms/LuckPerms.git
synced 2024-11-24 11:38:40 +01:00
Lower sync wait buffer & fix export command
This commit is contained in:
parent
dc87ec1c82
commit
bb9eab0989
@ -145,7 +145,7 @@ public class LPBukkitPlugin extends JavaPlugin implements LuckPermsPlugin {
|
||||
}
|
||||
|
||||
final LPBukkitPlugin i = this;
|
||||
updateTaskBuffer = new BufferedRequest<Void>(6000L, this::doAsync) {
|
||||
updateTaskBuffer = new BufferedRequest<Void>(1000L, this::doAsync) {
|
||||
@Override
|
||||
protected Void perform() {
|
||||
getServer().getScheduler().runTaskAsynchronously(i, new UpdateTask(i));
|
||||
|
@ -126,7 +126,7 @@ public class LPBungeePlugin extends Plugin implements LuckPermsPlugin {
|
||||
contextManager.registerCalculator(new ServerCalculator<>(getConfiguration().getServer()));
|
||||
|
||||
final LPBungeePlugin i = this;
|
||||
updateTaskBuffer = new BufferedRequest<Void>(6000L, this::doAsync) {
|
||||
updateTaskBuffer = new BufferedRequest<Void>(1000L, this::doAsync) {
|
||||
@Override
|
||||
protected Void perform() {
|
||||
doAsync(new UpdateTask(i));
|
||||
|
@ -142,7 +142,7 @@ public class ExportCommand extends SingleMainCommand {
|
||||
}
|
||||
|
||||
if (!inDefault) {
|
||||
write(writer, "/luckperms user " + user.getUuid().toString() + " removegroup default");
|
||||
write(writer, "/luckperms user " + user.getUuid().toString() + " parent remove default");
|
||||
}
|
||||
|
||||
plugin.getUserManager().cleanup(user);
|
||||
@ -183,11 +183,11 @@ public class ExportCommand extends SingleMainCommand {
|
||||
|
||||
if (node.isGroupNode()) {
|
||||
if (node.isTemporary()) {
|
||||
sb.append(group ? "settempinherit " : "addtempgroup ");
|
||||
sb.append("parent addtemp ");
|
||||
sb.append(node.getGroupName());
|
||||
sb.append(" ").append(node.getExpiryUnixTime());
|
||||
} else {
|
||||
sb.append(group ? "setinherit " : "addgroup ");
|
||||
sb.append("parent add ");
|
||||
sb.append(node.getGroupName());
|
||||
}
|
||||
|
||||
@ -200,8 +200,13 @@ public class ExportCommand extends SingleMainCommand {
|
||||
return sb.toString();
|
||||
}
|
||||
|
||||
sb.append(node.isTemporary() ? "settemp " : "set ");
|
||||
sb.append(node.getPermission()).append(" ").append(node.getValue());
|
||||
sb.append(node.isTemporary() ? "permission settemp " : "permission set ");
|
||||
if (node.getPermission().contains(" ")) {
|
||||
sb.append("\"").append(node.getPermission()).append("\"");
|
||||
} else {
|
||||
sb.append(node.getPermission());
|
||||
}
|
||||
sb.append(" ").append(node.getValue());
|
||||
|
||||
if (node.isTemporary()) {
|
||||
sb.append(" ").append(node.getExpiryUnixTime());
|
||||
|
@ -169,7 +169,7 @@ public class LPSpongePlugin implements LuckPermsPlugin {
|
||||
Sponge.getServiceManager().setProvider(this, LuckPermsApi.class, apiProvider);
|
||||
|
||||
final LPSpongePlugin i = this;
|
||||
updateTaskBuffer = new BufferedRequest<Void>(6000L, this::doAsync) {
|
||||
updateTaskBuffer = new BufferedRequest<Void>(1000L, this::doAsync) {
|
||||
@Override
|
||||
protected Void perform() {
|
||||
scheduler.createTaskBuilder().async().execute(new UpdateTask(i)).submit(i);
|
||||
|
Loading…
Reference in New Issue
Block a user