在设置中可以修改联合封禁服务器的地址。

This commit is contained in:
zhbaor 2020-06-19 16:08:08 +08:00
parent c33ca2dd71
commit fb69fb1ffe
4 changed files with 27 additions and 21 deletions

View file

@ -23,6 +23,8 @@ public class ClientPlugin extends JavaPlugin {
Objects.requireNonNull(this.getCommand("unionban")).setExecutor(executor);
Objects.requireNonNull(this.getCommand("unionban")).setTabCompleter(executor);
saveDefaultConfig();
ServerAddress = getConfig().getString("ServerAddress");
getLogger().info("UnionBan Server address: " + ServerAddress);
new LoginTask(this, Bukkit.getConsoleSender()).runTaskAsynchronously(this);
}

View file

@ -58,6 +58,7 @@ public class GetServerStatusTask extends BukkitRunnable {
@Override
public void run() {
sender.sendMessage("Querying server status...");
sender.sendMessage("The UnionBan Server address is " + plugin.ServerAddress);
try {
String version = GetVersion(plugin.ServerAddress);
sender.sendMessage("UnionBan Server is ON! Version: " + version);

View file

@ -1,4 +1,7 @@
# Do NOT change this file manually!
# UnionBan server address
ServerAddress: "https://api.unionban.icu"
# Login information.
# Do NOT change these manually!
username: ""
password: ""
api_key: ""