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

git rid of lua system

This commit is contained in:
2022-07-26 12:40:14 +04:00
parent 86c6e9464d
commit e7b241edd6
8 changed files with 23 additions and 140 deletions

View File

@@ -9,7 +9,6 @@ import com.imaginarycode.minecraft.redisbungee.api.*;
import com.imaginarycode.minecraft.redisbungee.api.config.RedisBungeeConfiguration;
import com.imaginarycode.minecraft.redisbungee.api.summoners.Summoner;
import com.imaginarycode.minecraft.redisbungee.api.tasks.*;
import com.imaginarycode.minecraft.redisbungee.api.util.lua.LuaManager;
import com.imaginarycode.minecraft.redisbungee.api.util.uuid.NameFetcher;
import com.imaginarycode.minecraft.redisbungee.api.util.uuid.UUIDFetcher;
import com.imaginarycode.minecraft.redisbungee.api.util.uuid.UUIDTranslator;
@@ -61,8 +60,6 @@ public class RedisBungeeVelocityPlugin implements RedisBungeePlugin<Player> {
private ScheduledTask integrityCheck;
private ScheduledTask heartbeatTask;
private final LuaManager.Script getRedisTimeScript;
private static final Object SERVER_TO_PLAYERS_KEY = new Object();
public static final List<ChannelIdentifier> IDENTIFIERS = List.of(
MinecraftChannelIdentifier.create("legacy", "redisbungee"),
@@ -88,9 +85,7 @@ public class RedisBungeeVelocityPlugin implements RedisBungeePlugin<Player> {
throw new RuntimeException("Unable to connect to your Redis server!", e);
}
this.api = new RedisBungeeAPI(this);
LuaManager luaManager = new LuaManager(this);
this.getRedisTimeScript = InitialUtils.getTimeScript(this, luaManager);
getLogger().info("lua manager was loaded");
InitialUtils.checkRedisVersion(this);
// check if this proxy is recovering from a crash and start heart the beat.
InitialUtils.checkIfRecovering(this, getDataFolder());
uuidTranslator = new UUIDTranslator(this);
@@ -327,11 +322,6 @@ public class RedisBungeeVelocityPlugin implements RedisBungeePlugin<Player> {
return this.redisBungeeMode;
}
@Override
public Long getRedisTime() {
return getRedisTime((List<String>) this.getRedisTimeScript.eval(Collections.singletonList("0"), Collections.emptyList()));
}
@Override
public void updateProxyIds() {
this.proxiesIds = this.getCurrentProxiesIds(false);