2
0
mirror of https://github.com/proxiodev/RedisBungee.git synced 2026-04-08 16:10:26 +00:00

remove old commands system, rename register leagacy command to register commands.

This commit is contained in:
2023-09-30 12:50:32 +04:00
parent eed91dd73d
commit 9b54ca93db
7 changed files with 16 additions and 752 deletions

View File

@@ -50,7 +50,7 @@ public interface ConfigLoader {
}
final boolean useSSL = node.getNode("useSSL").getBoolean(false);
final boolean overrideBungeeCommands = node.getNode("override-bungee-commands").getBoolean(false);
final boolean registerLegacyCommands = node.getNode("register-legacy-commands").getBoolean(false);
final boolean registerCommands = node.getNode("register-commands").getBoolean(false);
final boolean kickWhenOnline = node.getNode("kick-when-online").getBoolean(true);
String redisPassword = node.getNode("redis-password").getString("");
String redisUsername = node.getNode("redis-username").getString("");
@@ -94,7 +94,7 @@ public interface ConfigLoader {
plugin.logInfo("handle reconnect to last server: {}", reconnectToLastServer);
plugin.logInfo("handle motd: {}", handleMotd);
RedisBungeeConfiguration configuration = new RedisBungeeConfiguration(proxyId, exemptAddresses, registerLegacyCommands, overrideBungeeCommands, kickWhenOnline, reconnectToLastServer, handleMotd);
RedisBungeeConfiguration configuration = new RedisBungeeConfiguration(proxyId, exemptAddresses, registerCommands, overrideBungeeCommands, kickWhenOnline, reconnectToLastServer, handleMotd);
Summoner<?> summoner;
RedisBungeeMode redisBungeeMode;
if (useSSL) {

View File

@@ -11,9 +11,7 @@
package com.imaginarycode.minecraft.redisbungee.api.config;
import com.google.common.collect.ImmutableList;
import com.google.common.collect.ImmutableMap;
import com.google.common.net.InetAddresses;
import net.kyori.adventure.text.Component;
import java.net.InetAddress;
import java.util.List;
@@ -23,7 +21,7 @@ public class RedisBungeeConfiguration {
public static final int CONFIG_VERSION = 2;
private final String proxyId;
private final List<InetAddress> exemptAddresses;
private final boolean registerLegacyCommands;
private final boolean registerCommands;
private final boolean overrideBungeeCommands;
private final boolean kickWhenOnline;
@@ -31,14 +29,14 @@ public class RedisBungeeConfiguration {
private final boolean handleMotd;
public RedisBungeeConfiguration(String proxyId, List<String> exemptAddresses, boolean registerLegacyCommands, boolean overrideBungeeCommands, boolean kickWhenOnline, boolean handleReconnectToLastServer, boolean handleMotd) {
public RedisBungeeConfiguration(String proxyId, List<String> exemptAddresses, boolean registerCommands, boolean overrideBungeeCommands, boolean kickWhenOnline, boolean handleReconnectToLastServer, boolean handleMotd) {
this.proxyId = proxyId;
ImmutableList.Builder<InetAddress> addressBuilder = ImmutableList.builder();
for (String s : exemptAddresses) {
addressBuilder.add(InetAddresses.forString(s));
}
this.exemptAddresses = addressBuilder.build();
this.registerLegacyCommands = registerLegacyCommands;
this.registerCommands = registerCommands;
this.overrideBungeeCommands = overrideBungeeCommands;
this.kickWhenOnline = kickWhenOnline;
this.handleReconnectToLastServer = handleReconnectToLastServer;
@@ -53,8 +51,8 @@ public class RedisBungeeConfiguration {
return exemptAddresses;
}
public boolean doRegisterLegacyCommands() {
return registerLegacyCommands;
public boolean doRegisterCommands() {
return registerCommands;
}
public boolean doOverrideBungeeCommands() {

View File

@@ -57,10 +57,12 @@ enable-jedis-pool-compatibility: false
# max connections for the compatibility pool
compatibility-max-connections: 3
# Register redis bungee legacy commands
# Register RedisBungee commands
# if this disabled override-bungee-commands will be ignored
register-legacy-commands: false
register-commands: false
# THIS IS BUNGEECORD ONLY OPTION!
# Whether or not RedisBungee should install its version of regular BungeeCord commands.
# Often, the RedisBungee commands are desired, but in some cases someone may wish to
# override the commands using another plugin.