geforkt von Mirrors/Paper
Implements a World UID.
By: Rigby <rigby@onarandombox.com>
Dieser Commit ist enthalten in:
Ursprung
ae08c5c5ec
Commit
860f6ad4b7
@ -490,6 +490,16 @@ public final class CraftServer implements Server {
|
||||
return worlds.get(name.toLowerCase());
|
||||
}
|
||||
|
||||
public World getWorld(long uid) {
|
||||
for (String worldName : worlds.keySet()) {
|
||||
org.bukkit.World world = worlds.get(worldName);
|
||||
if (world.getUID() == uid) {
|
||||
return world;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
public void addWorld(World world) {
|
||||
worlds.put(world.getName().toLowerCase(), world);
|
||||
}
|
||||
|
@ -395,10 +395,15 @@ public class CraftWorld implements World {
|
||||
return world.worldData.name;
|
||||
}
|
||||
|
||||
@Deprecated
|
||||
public long getId() {
|
||||
return world.worldData.getSeed();
|
||||
}
|
||||
|
||||
public long getUID() {
|
||||
return world.worldData.getWorldUID();
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "CraftWorld{name=" + getName() + '}';
|
||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren