use of net.pl3x.minimap.mixin.MinecraftServerAccess in project MiniMap by pl3xgaming.
the class FileManager method start.
public void start() {
this.worldDirs.clear();
this.tilesDir = null;
if (MiniMap.getClient().isInSingleplayer()) {
MinecraftServerAccess server = (MinecraftServerAccess) MiniMap.getClient().getServer();
if (server == null) {
throw new RuntimeException("Cannot obtain single player world name");
}
this.tilesDir = resolve(this.configDir, "singleplayer/" + server.getSession().getDirectoryName());
} else {
ServerInfo server = MiniMap.getClient().getCurrentServerEntry();
if (server == null) {
throw new RuntimeException("Cannot obtain multiplayer server ip address");
}
this.tilesDir = resolve(this.configDir, "multiplayer/" + server.address);
}
}
Aggregations