"serverlist-ip" and "serverlist-port" options

This commit is contained in:
Alex231 2020-10-18 15:47:53 +01:00
parent 2457525c4b
commit 5b0df58d3f
2 changed files with 3 additions and 3 deletions

View File

@ -1,5 +1,5 @@
name: MineOnlineBroadcast
version: 1.0.5
version: 1.0.6
description: Lists a server on mineonline.codie.gg/servers
author: codieradical
authors: [Codie]

View File

@ -119,8 +119,8 @@ public class MineOnlineBroadcast extends JavaPlugin {
Properties propertiesFile = new Properties();
propertiesFile.load(new FileInputStream(new File("server.properties")));
String ip = propertiesFile.getProperty("server-ip", null);
String port = propertiesFile.getProperty("server-port", "25565");
String ip = propertiesFile.getProperty("serverlist-ip", propertiesFile.getProperty("server-ip", propertiesFile.getProperty("ip", null)));
String port = propertiesFile.getProperty("serverlist-port", propertiesFile.getProperty("server-port", propertiesFile.getProperty("port", "25565")));
int users = getServer().getOnlinePlayers().length;
String maxUsers = propertiesFile.getProperty("max-players", "20");
String name = propertiesFile.getProperty("server-name", "Minecraft Server");