在设置中可以修改联合封禁服务器的地址。
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"?>
|
<?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"
|
<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">
|
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
|
||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
<groupId>cn.cnklp.studio</groupId>
|
<groupId>cn.cnklp.studio</groupId>
|
||||||
<artifactId>UnionBanClientSpigot</artifactId>
|
<artifactId>UnionBanClientSpigot</artifactId>
|
||||||
<version>1.0-SNAPSHOT</version>
|
<version>1.0-SNAPSHOT</version>
|
||||||
<build>
|
<build>
|
||||||
<plugins>
|
<plugins>
|
||||||
<plugin>
|
<plugin>
|
||||||
<artifactId>maven-shade-plugin</artifactId>
|
<artifactId>maven-shade-plugin</artifactId>
|
||||||
<version>3.2.3</version>
|
<version>3.2.3</version>
|
||||||
<executions>
|
<executions>
|
||||||
<execution>
|
<execution>
|
||||||
<phase>package</phase>
|
<phase>package</phase>
|
||||||
<goals>
|
<goals>
|
||||||
<goal>shade</goal>
|
<goal>shade</goal>
|
||||||
</goals>
|
</goals>
|
||||||
<configuration>
|
<configuration>
|
||||||
<minimizeJar>true</minimizeJar>
|
<minimizeJar>true</minimizeJar>
|
||||||
</configuration>
|
</configuration>
|
||||||
</execution>
|
</execution>
|
||||||
</executions>
|
</executions>
|
||||||
</plugin>
|
</plugin>
|
||||||
<plugin>
|
<plugin>
|
||||||
<artifactId>maven-compiler-plugin</artifactId>
|
<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")).setExecutor(executor);
|
||||||
Objects.requireNonNull(this.getCommand("unionban")).setTabCompleter(executor);
|
Objects.requireNonNull(this.getCommand("unionban")).setTabCompleter(executor);
|
||||||
saveDefaultConfig();
|
saveDefaultConfig();
|
||||||
|
ServerAddress = getConfig().getString("ServerAddress");
|
||||||
|
getLogger().info("UnionBan Server address: " + ServerAddress);
|
||||||
new LoginTask(this, Bukkit.getConsoleSender()).runTaskAsynchronously(this);
|
new LoginTask(this, Bukkit.getConsoleSender()).runTaskAsynchronously(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -58,6 +58,7 @@ public class GetServerStatusTask extends BukkitRunnable {
|
||||||
@Override
|
@Override
|
||||||
public void run() {
|
public void run() {
|
||||||
sender.sendMessage("Querying server status...");
|
sender.sendMessage("Querying server status...");
|
||||||
|
sender.sendMessage("The UnionBan Server address is " + plugin.ServerAddress);
|
||||||
try {
|
try {
|
||||||
String version = GetVersion(plugin.ServerAddress);
|
String version = GetVersion(plugin.ServerAddress);
|
||||||
sender.sendMessage("UnionBan Server is ON! Version: " + version);
|
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: ""
|
username: ""
|
||||||
password: ""
|
password: ""
|
||||||
api_key: ""
|
api_key: ""
|
Loading…
Reference in a new issue