Update for 1.0.0

This commit is contained in:
Erik Broes
2011-11-20 00:01:14 -08:00
committed by Erik Broes
parent 589f66bd1b
commit 345ea36c7b
153 changed files with 6128 additions and 4617 deletions

View File

@@ -82,7 +82,6 @@ import org.yaml.snakeyaml.error.MarkedYAMLException;
public final class CraftServer implements Server {
private final String serverName = "Craftbukkit";
private final String serverVersion;
private final String protocolVersion = "1.8.1";
private final String bukkitVersion = Versioning.getBukkitVersion();
private final ServicesManager servicesManager = new SimpleServicesManager();
private final BukkitScheduler scheduler = new CraftScheduler(this);
@@ -105,7 +104,7 @@ public final class CraftServer implements Server {
this.serverVersion = CraftServer.class.getPackage().getImplementationVersion();
Bukkit.setServer(this);
if (!Main.useConsole) {
getLogger().info("Console input is disabled due to --noconsole command argument");
}
@@ -114,17 +113,17 @@ public final class CraftServer implements Server {
configuration.options().copyDefaults(true);
configuration.setDefaults(YamlConfiguration.loadConfiguration(getClass().getClassLoader().getResourceAsStream("configurations/bukkit.yml")));
saveConfig();
loadPlugins();
enablePlugins(PluginLoadOrder.STARTUP);
ChunkCompressionThread.startThread();
}
private File getConfigFile() {
return (File)console.options.valueOf("bukkit-settings");
}
private void saveConfig() {
try {
configuration.save(getConfigFile());
@@ -195,9 +194,9 @@ public final class CraftServer implements Server {
}
public String getVersion() {
return serverVersion + " (MC: " + protocolVersion + ")";
return serverVersion + " (MC: " + console.getVersion() + ")";
}
public String getBukkitVersion() {
return bukkitVersion;
}
@@ -471,7 +470,7 @@ public final class CraftServer implements Server {
@Override
public String toString() {
return "CraftServer{" + "serverName=" + serverName + ",serverVersion=" + serverVersion + ",protocolVersion=" + protocolVersion + '}';
return "CraftServer{" + "serverName=" + serverName + ",serverVersion=" + serverVersion + ",minecraftVersion=" + console.getVersion() + '}';
}
public World createWorld(String name, World.Environment environment) {
@@ -519,7 +518,8 @@ public final class CraftServer implements Server {
}
int dimension = 10 + console.worlds.size();
WorldServer internal = new WorldServer(console, new ServerNBTManager(getWorldContainer(), name, true), name, dimension, new WorldSettings(creator.seed(), getDefaultGameMode().getValue(), true), creator.environment(), generator);
boolean hardcore = false;
WorldServer internal = new WorldServer(console, new ServerNBTManager(getWorldContainer(), name, true), name, dimension, new WorldSettings(creator.seed(), getDefaultGameMode().getValue(), true, hardcore), creator.environment(), generator);
if (!(worlds.containsKey(name.toLowerCase()))) {
return null;
@@ -908,7 +908,7 @@ public final class CraftServer implements Server {
}
}
}
public File getWorldContainer() {
return new File(configuration.getString("settings.world-container", "."));
}