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>
|
||||
<properties>
|
||||
<build.version>unknown</build.version>
|
||||
<api.version>unknown</api.version>
|
||||
</properties>
|
||||
<repositories>
|
||||
<repository>
|
||||
@ -54,7 +55,12 @@
|
||||
<transformer implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer">
|
||||
<manifestEntries>
|
||||
<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>
|
||||
</transformer>
|
||||
</transformers>
|
||||
|
@ -19,7 +19,8 @@ import org.bukkit.plugin.java.JavaPluginLoader;
|
||||
|
||||
public final class CraftServer implements Server {
|
||||
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 CommandMap commandMap = new SimpleCommandMap(this);
|
||||
protected final MinecraftServer console;
|
||||
@ -28,6 +29,7 @@ public final class CraftServer implements Server {
|
||||
public CraftServer(MinecraftServer console, ServerConfigurationManager server) {
|
||||
this.console = console;
|
||||
this.server = server;
|
||||
this.serverVersion = CraftServer.class.getPackage().getImplementationVersion();
|
||||
|
||||
pluginManager.RegisterInterface(JavaPluginLoader.class);
|
||||
}
|
||||
@ -66,7 +68,7 @@ public final class CraftServer implements Server {
|
||||
}
|
||||
|
||||
public String getVersion() {
|
||||
return serverVersion;
|
||||
return serverVersion + " (MC: " + protocolVersion + ")";
|
||||
}
|
||||
|
||||
public Player[] getOnlinePlayers() {
|
||||
|
In neuem Issue referenzieren
Einen Benutzer sperren