Introduce better versioning system, mark 2.
Dieser Commit ist enthalten in:
Ursprung
eea070ed85
Commit
3a3a0e6169
8
pom.xml
8
pom.xml
@ -8,6 +8,7 @@
|
|||||||
<url>http://www.bukkit.org</url>
|
<url>http://www.bukkit.org</url>
|
||||||
<properties>
|
<properties>
|
||||||
<build.version>unknown</build.version>
|
<build.version>unknown</build.version>
|
||||||
|
<api.version>unknown</api.version>
|
||||||
</properties>
|
</properties>
|
||||||
<repositories>
|
<repositories>
|
||||||
<repository>
|
<repository>
|
||||||
@ -54,7 +55,12 @@
|
|||||||
<transformer implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer">
|
<transformer implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer">
|
||||||
<manifestEntries>
|
<manifestEntries>
|
||||||
<Main-Class>org.bukkit.craftbukkit.Main</Main-Class>
|
<Main-Class>org.bukkit.craftbukkit.Main</Main-Class>
|
||||||
<Build-Version>${build.version}</Build-Version>
|
<Implementation-Title>CraftBukkit</Implementation-Title>
|
||||||
|
<Implementation-Version>${build.version}</Implementation-Version>
|
||||||
|
<Implementation-Vendor>Bukkit Team</Implementation-Title>
|
||||||
|
<Specification-Title>Bukkit</Specification-Title>
|
||||||
|
<Specification-Version>${api.version}</Specification-Version>
|
||||||
|
<Specification-Vendor>Bukkit Team</Specification-Vendor>
|
||||||
</manifestEntries>
|
</manifestEntries>
|
||||||
</transformer>
|
</transformer>
|
||||||
</transformers>
|
</transformers>
|
||||||
|
@ -19,7 +19,8 @@ import org.bukkit.plugin.java.JavaPluginLoader;
|
|||||||
|
|
||||||
public final class CraftServer implements Server {
|
public final class CraftServer implements Server {
|
||||||
private final String serverName = "Craftbukkit";
|
private final String serverName = "Craftbukkit";
|
||||||
private final String serverVersion = "1.2_01";
|
private final String serverVersion;
|
||||||
|
private final String protocolVersion = "1.2_01";
|
||||||
private final PluginManager pluginManager = new SimplePluginManager(this);
|
private final PluginManager pluginManager = new SimplePluginManager(this);
|
||||||
private final CommandMap commandMap = new SimpleCommandMap(this);
|
private final CommandMap commandMap = new SimpleCommandMap(this);
|
||||||
protected final MinecraftServer console;
|
protected final MinecraftServer console;
|
||||||
@ -28,6 +29,7 @@ public final class CraftServer implements Server {
|
|||||||
public CraftServer(MinecraftServer console, ServerConfigurationManager server) {
|
public CraftServer(MinecraftServer console, ServerConfigurationManager server) {
|
||||||
this.console = console;
|
this.console = console;
|
||||||
this.server = server;
|
this.server = server;
|
||||||
|
this.serverVersion = CraftServer.class.getPackage().getImplementationVersion();
|
||||||
|
|
||||||
pluginManager.RegisterInterface(JavaPluginLoader.class);
|
pluginManager.RegisterInterface(JavaPluginLoader.class);
|
||||||
}
|
}
|
||||||
@ -66,7 +68,7 @@ public final class CraftServer implements Server {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public String getVersion() {
|
public String getVersion() {
|
||||||
return serverVersion;
|
return serverVersion + " (MC: " + protocolVersion + ")";
|
||||||
}
|
}
|
||||||
|
|
||||||
public Player[] getOnlinePlayers() {
|
public Player[] getOnlinePlayers() {
|
||||||
|
In neuem Issue referenzieren
Einen Benutzer sperren