Automatically push updates to other servers via the messaging service when commands are ran

This commit is contained in:
Luck
2017-03-21 21:54:34 +00:00
Unverified
parent f8ad562b95
commit c36b0d2975
15 changed files with 128 additions and 4 deletions
@@ -49,6 +49,7 @@ import me.lucko.luckperms.common.locale.SimpleLocaleManager;
import me.lucko.luckperms.common.managers.TrackManager;
import me.lucko.luckperms.common.managers.impl.GenericTrackManager;
import me.lucko.luckperms.common.messaging.InternalMessagingService;
import me.lucko.luckperms.common.messaging.NoopMessagingService;
import me.lucko.luckperms.common.messaging.RedisMessaging;
import me.lucko.luckperms.common.plugin.LuckPermsPlugin;
import me.lucko.luckperms.common.plugin.LuckPermsScheduler;
@@ -222,6 +223,10 @@ public class LPSpongePlugin implements LuckPermsPlugin {
getLog().warn("Messaging service '" + messagingType + "' not recognised.");
}
if (messagingService == null) {
messagingService = new NoopMessagingService();
}
// setup the update task buffer
updateTaskBuffer = new BufferedRequest<Void>(1000L, this::doAsync) {
@Override
+3
View File
@@ -209,6 +209,9 @@ data {
# none ==> nothing
messaging-service="none"
# If LuckPerms should automatically push updates after a change has been made with a command.
auto-push-updates=true
# Settings for Redis.
# Port 6379 is used by default; set address to "host:port" if differs
redis {