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
@@ -60,6 +60,7 @@ import me.lucko.luckperms.common.managers.impl.GenericGroupManager;
import me.lucko.luckperms.common.managers.impl.GenericTrackManager;
import me.lucko.luckperms.common.managers.impl.GenericUserManager;
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.storage.Storage;
@@ -217,6 +218,10 @@ public class LPBukkitPlugin extends JavaPlugin 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
@@ -258,6 +258,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: