mirror of
https://github.com/PaperMC/Paper.git
synced 2024-12-04 14:04:49 +01:00
ConsoleCommandSender no longer has a default constructor, use ConsoleCommandSender(server). Added entity.getServer and updated the version number of mc
This commit is contained in:
parent
6655b89037
commit
bfca34cad4
4 changed files with 8 additions and 2 deletions
|
@ -50,7 +50,7 @@ public class MinecraftServer implements Runnable, ICommandListener {
|
||||||
public List<WorldServer> worlds = new ArrayList<WorldServer>();
|
public List<WorldServer> worlds = new ArrayList<WorldServer>();
|
||||||
public CraftServer server;
|
public CraftServer server;
|
||||||
public OptionSet options;
|
public OptionSet options;
|
||||||
public ConsoleCommandSender console = new ConsoleCommandSender();
|
public ConsoleCommandSender console;
|
||||||
// Craftbukkit end
|
// Craftbukkit end
|
||||||
|
|
||||||
public MinecraftServer(OptionSet options) { // Craftbukkit - adds argument OptionSet
|
public MinecraftServer(OptionSet options) { // Craftbukkit - adds argument OptionSet
|
||||||
|
|
|
@ -14,6 +14,7 @@ import java.util.logging.Logger;
|
||||||
|
|
||||||
// CraftBukkit start
|
// CraftBukkit start
|
||||||
import org.bukkit.Location;
|
import org.bukkit.Location;
|
||||||
|
import org.bukkit.command.ConsoleCommandSender;
|
||||||
import org.bukkit.craftbukkit.CraftServer;
|
import org.bukkit.craftbukkit.CraftServer;
|
||||||
import org.bukkit.craftbukkit.CraftWorld;
|
import org.bukkit.craftbukkit.CraftWorld;
|
||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
|
@ -47,6 +48,7 @@ public class ServerConfigurationManager {
|
||||||
|
|
||||||
public ServerConfigurationManager(MinecraftServer minecraftserver) {
|
public ServerConfigurationManager(MinecraftServer minecraftserver) {
|
||||||
minecraftserver.server = new CraftServer(minecraftserver, this);
|
minecraftserver.server = new CraftServer(minecraftserver, this);
|
||||||
|
minecraftserver.console = new ConsoleCommandSender(minecraftserver.server);
|
||||||
server = minecraftserver.server;
|
server = minecraftserver.server;
|
||||||
// CraftBukkit end
|
// CraftBukkit end
|
||||||
|
|
||||||
|
|
|
@ -30,7 +30,7 @@ import org.bukkit.event.world.WorldEvent;
|
||||||
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;
|
private final String serverVersion;
|
||||||
private final String protocolVersion = "1.2_01";
|
private final String protocolVersion = "1.3";
|
||||||
private final PluginManager pluginManager = new SimplePluginManager(this);
|
private final PluginManager pluginManager = new SimplePluginManager(this);
|
||||||
private final BukkitScheduler scheduler = new CraftScheduler(this);
|
private final BukkitScheduler scheduler = new CraftScheduler(this);
|
||||||
private final CommandMap commandMap = new SimpleCommandMap(this);
|
private final CommandMap commandMap = new SimpleCommandMap(this);
|
||||||
|
|
|
@ -173,4 +173,8 @@ public abstract class CraftEntity implements org.bukkit.entity.Entity {
|
||||||
public String toString() {
|
public String toString() {
|
||||||
return "CraftEntity{" + "id=" + getEntityId() + '}';
|
return "CraftEntity{" + "id=" + getEntityId() + '}';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public CraftServer getServer() {
|
||||||
|
return server;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue