1.4: Теперь можно указывать отдаваемую версию игры и id протокола
This commit is contained in:
parent
ffd0758857
commit
5932933f77
4 changed files with 22 additions and 29 deletions
|
|
@ -17,9 +17,11 @@ public final class LegacyPing extends JavaPlugin {
|
|||
final FileConfiguration config = this.getConfig();
|
||||
final String host = config.getString("host", "0.0.0.0");
|
||||
final List<Integer> ports = config.getIntegerList("port");
|
||||
final String version = config.getString("displayedVersion", "b1.7.3");
|
||||
final int protocol = config.getInt("displayedProtocol", 17);
|
||||
for (int port : ports) {
|
||||
try {
|
||||
this.threads.add(new ServerThread(this.getServer(), host, port));
|
||||
this.threads.add(new ServerThread(this.getServer(), host, port, version, protocol));
|
||||
} catch (IOException e) {
|
||||
this.getLogger().log(Level.WARNING, "Failed to create ServerSocket", e);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue