mirror of
https://github.com/PaperMC/Paper.git
synced 2024-12-12 01:41:05 +01:00
Fixed initialization of CraftServer
This commit is contained in:
parent
0582ac7693
commit
75ba9a0f25
2 changed files with 10 additions and 4 deletions
|
@ -38,7 +38,8 @@ public class MinecraftServer implements ICommandListener, Runnable {
|
||||||
public boolean m;
|
public boolean m;
|
||||||
public boolean n;
|
public boolean n;
|
||||||
|
|
||||||
public MinecraftServer() {
|
// Craftbukkit start - adds argument OptionSet
|
||||||
|
public MinecraftServer(OptionSet options) {
|
||||||
new ThreadSleepForever(this);
|
new ThreadSleepForever(this);
|
||||||
// CraftBukkit start
|
// CraftBukkit start
|
||||||
this.options = options;
|
this.options = options;
|
||||||
|
@ -496,7 +497,7 @@ public class MinecraftServer implements ICommandListener, Runnable {
|
||||||
// Craftbukkit start - replaces main(String args[])
|
// Craftbukkit start - replaces main(String args[])
|
||||||
public static void main(final OptionSet options) {
|
public static void main(final OptionSet options) {
|
||||||
try {
|
try {
|
||||||
MinecraftServer minecraftserver = new MinecraftServer();
|
MinecraftServer minecraftserver = new MinecraftServer(options);
|
||||||
|
|
||||||
// CraftBukkit - remove gui
|
// CraftBukkit - remove gui
|
||||||
|
|
||||||
|
|
|
@ -36,7 +36,12 @@ public class ServerConfigurationManager {
|
||||||
private File k;
|
private File k;
|
||||||
private PlayerNBTManager l;
|
private PlayerNBTManager l;
|
||||||
|
|
||||||
|
private CraftServer server; // CraftBukkit
|
||||||
|
|
||||||
public ServerConfigurationManager(MinecraftServer minecraftserver) {
|
public ServerConfigurationManager(MinecraftServer minecraftserver) {
|
||||||
|
// CraftBukkit 2 lines!
|
||||||
|
minecraftserver.server = new CraftServer(minecraftserver, this);
|
||||||
|
server = minecraftserver.server;
|
||||||
this.c = minecraftserver;
|
this.c = minecraftserver;
|
||||||
this.i = minecraftserver.a("banned-players.txt");
|
this.i = minecraftserver.a("banned-players.txt");
|
||||||
this.j = minecraftserver.a("banned-ips.txt");
|
this.j = minecraftserver.a("banned-ips.txt");
|
||||||
|
@ -84,9 +89,9 @@ public class ServerConfigurationManager {
|
||||||
|
|
||||||
// CraftBukkit start
|
// CraftBukkit start
|
||||||
server.getPluginManager().callEvent(new PlayerEvent(PlayerEvent.Type.PLAYER_QUIT, server.getPlayer(entityplayer))); // CraftBukkit
|
server.getPluginManager().callEvent(new PlayerEvent(PlayerEvent.Type.PLAYER_QUIT, server.getPlayer(entityplayer))); // CraftBukkit
|
||||||
}
|
|
||||||
private CraftServer server;
|
|
||||||
// CraftBukkit end
|
// CraftBukkit end
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
public EntityPlayer a(NetLoginHandler netloginhandler, String s, String s1) {
|
public EntityPlayer a(NetLoginHandler netloginhandler, String s, String s1) {
|
||||||
// CraftBukkit start - note: this entire method needs to be changed
|
// CraftBukkit start - note: this entire method needs to be changed
|
||||||
|
|
Loading…
Reference in a new issue