diff --git a/bukkit/src/main/resources/config.yml b/bukkit/src/main/resources/config.yml index cb1167ece..99c4907be 100644 --- a/bukkit/src/main/resources/config.yml +++ b/bukkit/src/main/resources/config.yml @@ -241,6 +241,7 @@ watch-files: true # below. # => rabbitmq Uses RabbitMQ pub-sub to push changes. Your server connection info must be # configured below. +# => custom Uses a messaging service provided using the LuckPerms API. # => auto Attempts to automatically setup a messaging service using redis or sql. messaging-service: auto diff --git a/bungee/src/main/resources/config.yml b/bungee/src/main/resources/config.yml index d90c33588..dd4addc4f 100644 --- a/bungee/src/main/resources/config.yml +++ b/bungee/src/main/resources/config.yml @@ -239,6 +239,7 @@ watch-files: true # the RedisBungee plugin installed. # => rabbitmq Uses RabbitMQ pub-sub to push changes. Your server connection info must be # configured below. +# => custom Uses a messaging service provided using the LuckPerms API. # => auto Attempts to automatically setup a messaging service using redis or sql. messaging-service: auto diff --git a/common/src/main/java/me/lucko/luckperms/common/commands/misc/ExportCommand.java b/common/src/main/java/me/lucko/luckperms/common/commands/misc/ExportCommand.java index f9f34f87a..f8ecab689 100644 --- a/common/src/main/java/me/lucko/luckperms/common/commands/misc/ExportCommand.java +++ b/common/src/main/java/me/lucko/luckperms/common/commands/misc/ExportCommand.java @@ -38,13 +38,19 @@ import me.lucko.luckperms.common.util.Predicates; import java.io.IOException; import java.nio.file.Files; import java.nio.file.Path; +import java.time.Instant; +import java.time.ZoneId; +import java.time.format.DateTimeFormatter; import java.util.concurrent.atomic.AtomicBoolean; public class ExportCommand extends SingleCommand { + private static final DateTimeFormatter DATE_FORMAT = DateTimeFormatter.ofPattern("yyyy-MM-dd-HH-mm") + .withZone(ZoneId.systemDefault()); + private final AtomicBoolean running = new AtomicBoolean(false); public ExportCommand() { - super(CommandSpec.EXPORT, "Export", CommandPermission.EXPORT, Predicates.notInRange(1, 2)); + super(CommandSpec.EXPORT, "Export", CommandPermission.EXPORT, Predicates.alwaysFalse()); } @Override @@ -68,7 +74,12 @@ public class ExportCommand extends SingleCommand { exporter = new Exporter.WebUpload(plugin, sender, includeUsers, includeGroups, label); } else { Path dataDirectory = plugin.getBootstrap().getDataDirectory(); - Path path = dataDirectory.resolve(args.get(0) + ".json.gz"); + Path path; + if (args.isEmpty()) { + path = dataDirectory.resolve("luckperms-" + DATE_FORMAT.format(Instant.now()) + ".json.gz"); + } else { + path = dataDirectory.resolve(args.get(0) + ".json.gz"); + } if (!path.getParent().equals(dataDirectory)) { Message.FILE_NOT_WITHIN_DIRECTORY.send(sender, path.toString()); diff --git a/fabric/src/main/resources/luckperms.conf b/fabric/src/main/resources/luckperms.conf index 73c0825c0..2eb38d6eb 100644 --- a/fabric/src/main/resources/luckperms.conf +++ b/fabric/src/main/resources/luckperms.conf @@ -244,6 +244,7 @@ watch-files = true # below. # => rabbitmq Uses RabbitMQ pub-sub to push changes. Your server connection info must be # configured below. +# => custom Uses a messaging service provided using the LuckPerms API. # => auto Attempts to automatically setup a messaging service using redis or sql. messaging-service = "auto" diff --git a/nukkit/src/main/resources/config.yml b/nukkit/src/main/resources/config.yml index a20e4fe03..b61a708d9 100644 --- a/nukkit/src/main/resources/config.yml +++ b/nukkit/src/main/resources/config.yml @@ -236,6 +236,7 @@ watch-files: true # below. # => rabbitmq Uses RabbitMQ pub-sub to push changes. Your server connection info must be # configured below. +# => custom Uses a messaging service provided using the LuckPerms API. # => auto Attempts to automatically setup a messaging service using redis or sql. messaging-service: auto diff --git a/sponge/src/main/resources/luckperms.conf b/sponge/src/main/resources/luckperms.conf index ac04c48ba..0828a3789 100644 --- a/sponge/src/main/resources/luckperms.conf +++ b/sponge/src/main/resources/luckperms.conf @@ -244,6 +244,7 @@ watch-files = true # below. # => rabbitmq Uses RabbitMQ pub-sub to push changes. Your server connection info must be # configured below. +# => custom Uses a messaging service provided using the LuckPerms API. # => auto Attempts to automatically setup a messaging service using redis or sql. messaging-service = "auto" diff --git a/velocity/src/main/resources/config.yml b/velocity/src/main/resources/config.yml index e6eb8c7d8..96bad0cd3 100644 --- a/velocity/src/main/resources/config.yml +++ b/velocity/src/main/resources/config.yml @@ -230,6 +230,7 @@ watch-files: true # configured below. # => rabbitmq Uses RabbitMQ pub-sub to push changes. Your server connection info must be # configured below. +# => custom Uses a messaging service provided using the LuckPerms API. # => auto Attempts to automatically setup a messaging service using redis or sql. messaging-service: auto