在设置中可以修改联合封禁服务器的地址。
This commit is contained in:
parent
c33ca2dd71
commit
fb69fb1ffe
4 changed files with 27 additions and 21 deletions
|
@ -1,26 +1,26 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://maven.apache.org/POM/4.0.0"
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<groupId>cn.cnklp.studio</groupId>
|
||||
<artifactId>UnionBanClientSpigot</artifactId>
|
||||
<version>1.0-SNAPSHOT</version>
|
||||
<build>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<artifactId>maven-shade-plugin</artifactId>
|
||||
<version>3.2.3</version>
|
||||
<executions>
|
||||
<execution>
|
||||
<phase>package</phase>
|
||||
<goals>
|
||||
<goal>shade</goal>
|
||||
</goals>
|
||||
<configuration>
|
||||
<minimizeJar>true</minimizeJar>
|
||||
</configuration>
|
||||
</execution>
|
||||
</executions>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<groupId>cn.cnklp.studio</groupId>
|
||||
<artifactId>UnionBanClientSpigot</artifactId>
|
||||
<version>1.0-SNAPSHOT</version>
|
||||
<build>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<artifactId>maven-shade-plugin</artifactId>
|
||||
<version>3.2.3</version>
|
||||
<executions>
|
||||
<execution>
|
||||
<phase>package</phase>
|
||||
<goals>
|
||||
<goal>shade</goal>
|
||||
</goals>
|
||||
<configuration>
|
||||
<minimizeJar>true</minimizeJar>
|
||||
</configuration>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<artifactId>maven-compiler-plugin</artifactId>
|
||||
|
|
|
@ -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