mirror of
https://github.com/PaperMC/Paper.git
synced 2024-12-28 07:20:24 +01:00
I'm quite aware that I fail at merging.
By: Dinnerbone <dinnerbone@dinnerbone.com>
This commit is contained in:
parent
7ebb3fa77c
commit
ca376a1225
1 changed files with 11 additions and 2 deletions
|
@ -11,6 +11,7 @@ import net.minecraft.server.EntityPlayer;
|
|||
import net.minecraft.server.MinecraftServer;
|
||||
import net.minecraft.server.PropertyManager;
|
||||
import net.minecraft.server.ServerConfigurationManager;
|
||||
import net.minecraft.server.WorldManager;
|
||||
import net.minecraft.server.WorldServer;
|
||||
import org.bukkit.*;
|
||||
import org.bukkit.plugin.Plugin;
|
||||
|
@ -153,8 +154,16 @@ public final class CraftServer implements Server {
|
|||
return scheduler;
|
||||
}
|
||||
|
||||
public World[] getWorlds() {
|
||||
return console.worlds.toArray(new World[0]);
|
||||
public List<World> getWorlds() {
|
||||
List<World> worlds = new ArrayList<World>();
|
||||
|
||||
synchronized (console.worlds) {
|
||||
for (WorldServer world : console.worlds) {
|
||||
worlds.add(world.getWorld());
|
||||
}
|
||||
}
|
||||
|
||||
return worlds;
|
||||
}
|
||||
|
||||
public ServerConfigurationManager getHandle() {
|
||||
|
|
Loading…
Reference in a new issue