3
0
Mirror von https://github.com/PaperMC/Paper.git synchronisiert 2024-11-16 21:10:17 +01:00

I'm quite aware that I fail at merging.

Dieser Commit ist enthalten in:
Dinnerbone 2011-02-07 01:59:06 +00:00
Ursprung 919023fe5d
Commit 172db788b3
2 geänderte Dateien mit 14 neuen und 8 gelöschten Zeilen

Datei anzeigen

@ -293,6 +293,8 @@ public class MinecraftServer implements ICommandListener, Runnable {
entityplayer.a.b((Packet) (new Packet4UpdateTime(entityplayer.world.e))); entityplayer.a.b((Packet) (new Packet4UpdateTime(entityplayer.world.e)));
} }
} }
((CraftScheduler) server.getScheduler()).mainThreadHeartbeat(this.h);
for (WorldServer world : worlds) { for (WorldServer world : worlds) {
world.f(); world.f();
@ -300,12 +302,7 @@ public class MinecraftServer implements ICommandListener, Runnable {
while (world.d()) { while (world.d()) {
; ;
} }
;
((CraftScheduler) server.getScheduler()).mainThreadHeartbeat(this.h);
while (this.e.d()) {
;
world.c(); world.c();
} }
// Craftbukkit end // Craftbukkit end

Datei anzeigen

@ -11,6 +11,7 @@ import net.minecraft.server.EntityPlayer;
import net.minecraft.server.MinecraftServer; import net.minecraft.server.MinecraftServer;
import net.minecraft.server.PropertyManager; import net.minecraft.server.PropertyManager;
import net.minecraft.server.ServerConfigurationManager; import net.minecraft.server.ServerConfigurationManager;
import net.minecraft.server.WorldManager;
import net.minecraft.server.WorldServer; import net.minecraft.server.WorldServer;
import org.bukkit.*; import org.bukkit.*;
import org.bukkit.plugin.Plugin; import org.bukkit.plugin.Plugin;
@ -153,8 +154,16 @@ public final class CraftServer implements Server {
return scheduler; return scheduler;
} }
public World[] getWorlds() { public List<World> getWorlds() {
return console.worlds.toArray(new World[0]); List<World> worlds = new ArrayList<World>();
synchronized (console.worlds) {
for (WorldServer world : console.worlds) {
worlds.add(world.getWorld());
}
}
return worlds;
} }
public ServerConfigurationManager getHandle() { public ServerConfigurationManager getHandle() {