在设置中可以修改联合封禁服务器的地址。
This commit is contained in:
parent
c33ca2dd71
commit
fb69fb1ffe
4 changed files with 27 additions and 21 deletions
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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: ""
|
Loading…
Reference in a new issue