Lower sync wait buffer & fix export command

This commit is contained in:
Luck 2016-10-24 13:02:26 +01:00
parent dc87ec1c82
commit bb9eab0989
No known key found for this signature in database
GPG Key ID: EFA9B3EC5FD90F8B
4 changed files with 13 additions and 8 deletions

View File

@ -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));

View File

@ -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));

View File

@ -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());

View File

@ -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);