Closed SpigotRCE closed 1 month ago
java.io.FileNotFoundException: Cannot find dimension registry file at ua.nanit.limbo.world.DimensionRegistry.readCodecFile(DimensionRegistry.java:160) ~[?:?] at ua.nanit.limbo.world.DimensionRegistry.load(DimensionRegistry.java:105) ~[?:?] at ua.nanit.limbo.server.LimboServer.start(LimboServer.java:93) ~[?:?] at org.nexuscraft.corevelocity.misc.LimboManager.createLimboServer(LimboManager.java:55) ~[?:?] at org.nexuscraft.corevelocity.misc.ServerHandler.onLimboRequest(ServerHandler.java:42) ~[?:?] at org.nexuscraft.corevelocity.listener.PlayerServerListener.onConnectionRequest(PlayerServerListener.java:52) ~[?:?] at org.nexuscraft.corevelocity.listener.Lmbda$33.execute(Unknown Source) ~[?:?] at com.velocitypowered.proxy.event.UntargetedEventHandler$VoidHandler.lambda$buildHandler$0(UntargetedEventHandler.java:56) ~[velocity.jar:3.3.0-SNAPSHOT (git-dfe5f54f)] at com.velocitypowered.proxy.event.VelocityEventManager.fire(VelocityEventManager.java:598) ~[velocity.jar:3.3.0-SNAPSHOT (git-dfe5f54f)] at com.velocitypowered.proxy.event.VelocityEventManager.lambda$fire$5(VelocityEventManager.java:479) ~[velocity.jar:3.3.0-SNAPSHOT (git-dfe5f54f)] at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1144) ~[?:?] at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:642) ~[?:?] at java.base/java.lang.Thread.run(Thread.java:1583) [?:?] [18:13:07 INFO]: [connected player] Milkthedev (49.43.119.201/49.43.119.201:60242) has disconnected: Unable to create limbo server! (Very Bad)```
the plugin jar is untouched
Client version: 2.20.2 (viaversion on the proxy)
How to reproduce, I don't know ( happens all the time)
My code,
package org.nexuscraft.corevelocity.misc;
import com.velocitypowered.api.proxy.ProxyServer;
import org.nexuscraft.corevelocity.Core;
import org.slf4j.Logger;
import ua.nanit.limbo.configuration.LimboConfig;
import ua.nanit.limbo.server.Command;
import ua.nanit.limbo.server.CommandHandler;
import ua.nanit.limbo.server.LimboServer;
import ua.nanit.limbo.server.data.BossBar;
import ua.nanit.limbo.server.data.InfoForwarding;
import ua.nanit.limbo.server.data.PingData;
import ua.nanit.limbo.server.data.Title;
import java.net.InetSocketAddress;
import java.net.SocketAddress;
import java.util.Collection;
import java.util.HashMap;
import java.util.List;
import java.util.Random;
public class LimboManager {
private final ProxyServer proxyServer;
private final Core plugin;
private final Logger logger;
private final HashMap<LimboServer, Integer> limboServers; // Limbo Instance, port number
private final Random random;
public LimboManager(ProxyServer proxyServer, Core plugin, Logger logger) {
this.proxyServer = proxyServer;
this.plugin = plugin;
this.logger = logger;
this.limboServers = new HashMap<>();
this.random = new Random();
logger.info("Started LimboManager");
}
public HashMap<LimboServer, Integer> getLimboServers() {
return limboServers;
}
public boolean createLimboServer() {
int port = 0;
while (port == 0) {
port = random.nextInt(65535) + 1024;
if (!limboServers.containsValue(port) && port != 25565 && port != 19132) {
break;
}
}
LimboServer limboServer = new LimboServer(new Config("local-limbo-" + port, port), new CommandHandler_(), getClass().getClassLoader());
limboServers.put(limboServer, port);
try {
limboServer.start();
} catch (Exception e) {
logger.error("Failed to start Limbo Server", e);
return false;
}
logger.info("Created Limbo Server: {}, on port {}", limboServer.getConfig().getBrandName(), port);
return true;
}
public void destroyLimboServer(LimboServer limboServer) {
int port = limboServers.get(limboServer);
limboServer.stop();
limboServers.remove(limboServer);
logger.info("Destroyed Limbo Server: {}, on port {}", limboServer.getConfig().getBrandName(), port);
}
private static class Config implements LimboConfig {
private final String name;
private final int port;
private final InfoForwarding infoForwarding;
public Config(String name, int port) {
this.name = name;
this.port = port;
this.infoForwarding = new InfoForwarding();
}
@Override
public SocketAddress getAddress() {
return new InetSocketAddress("0.0.0.0", port);
}
@Override
public int getMaxPlayers() {
return -1;
}
@Override
public PingData getPingData() {
return new PingData();
}
@Override
public String getDimensionType() {
return "THE_END";
}
@Override
public int getGameMode() {
return 3;
}
@Override
public InfoForwarding getInfoForwarding() {
return infoForwarding;
}
@Override
public long getReadTimeout() {
return 30000;
}
@Override
public int getDebugLevel() {
return 0;
}
@Override
public boolean isUseBrandName() {
return true;
}
@Override
public boolean isUseJoinMessage() {
return false;
}
@Override
public boolean isUseBossBar() {
return false;
}
@Override
public boolean isUseTitle() {
return false;
}
@Override
public boolean isUsePlayerList() {
return false;
}
@Override
public boolean isUseHeaderAndFooter() {
return false;
}
@Override
public String getBrandName() {
return name;
}
@Override
public String getJoinMessage() {
return "";
}
@Override
public BossBar getBossBar() {
return null;
}
@Override
public Title getTitle() {
return null;
}
@Override
public String getPlayerListUsername() {
return "";
}
@Override
public String getPlayerListHeader() {
return "";
}
@Override
public String getPlayerListFooter() {
return "";
}
@Override
public boolean isUseEpoll() {
return true;
}
@Override
public int getBossGroupSize() {
return 1;
}
@Override
public int getWorkerGroupSize() {
return 4;
}
}
private static class CommandHandler_ implements CommandHandler<Command> {
@Override
public Collection<Command> getCommands() {
return List.of();
}
@Override
public void register(Command command) {
}
@Override
public boolean executeCommand(String s) {
return false;
}
}
}
How does jar content looks like
Unrelated to the NanoLimboPlugin, use discussion for support