use of net.minecraft.client.network.ServerInfo in project BleachHack by BleachDrinker420.
the class AutoReconnect method sendPacket.
@BleachSubscribe
public void sendPacket(EventPacket.Send event) {
if (event.getPacket() instanceof HandshakeC2SPacket) {
HandshakeC2SPacket packet = (HandshakeC2SPacket) event.getPacket();
server = new ServerInfo("Server", packet.getAddress() + ":" + packet.getPort(), false);
}
}
use of net.minecraft.client.network.ServerInfo in project Client by MatHax.
the class ServerCleanUpScreen method cleanUp.
private void cleanUp() {
for (int i = multiplayerScreen.getServerList().size() - 1; i >= 0; i--) {
ServerInfo server = multiplayerScreen.getServerList().get(i);
if (removeAll.checked || shouldRemove(server))
multiplayerScreen.getServerList().remove(server);
}
if (rename.checked)
for (int i = 0; i < multiplayerScreen.getServerList().size(); i++) {
ServerInfo server = multiplayerScreen.getServerList().get(i);
server.name = "Server Finder " + (i + 1);
}
saveServerList();
client.setScreen(parent);
}
use of net.minecraft.client.network.ServerInfo in project Hypnotic-Client by Hypnotic-Development.
the class ServerFinder method saveServer.
private void saveServer(String ip) {
try {
if (saveMode.equalsIgnoreCase("Add servers") || saveMode.equalsIgnoreCase("Both")) {
multiplayerScreen.getServerList().add(new ServerInfo((findMode.equalsIgnoreCase("Minehut") ? "Minehut server " + valid : "Server finder " + valid), ip, false));
multiplayerScreen.getServerList().saveFile();
}
if (saveMode.equalsIgnoreCase("Save to file") || saveMode.equalsIgnoreCase("Both")) {
File serversFile = new File(Hypnotic.hypnoticDir + "/ServerFinder.txt");
if (!serversFile.exists()) {
serversFile.createNewFile();
}
BufferedWriter writer = new BufferedWriter(new FileWriter(serversFile));
writer.write("Server " + valid + " " + ip + "/n");
writer.close();
}
Hypnotic.LOGGER.log(Level.INFO, "Saved " + ip + " as Server " + valid);
valid++;
} catch (Exception e) {
e.printStackTrace();
}
}
Aggregations