mirror of
https://github.com/PaperMC/Paper.git
synced 2025-01-20 07:34:48 +01:00
uuid changes
By: Tahg <tahgtahv@gmail.com>
This commit is contained in:
parent
7a4e513ae4
commit
888de16db3
2 changed files with 7 additions and 4 deletions
|
@ -24,6 +24,7 @@ import java.util.LinkedHashMap;
|
|||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Random;
|
||||
import java.util.UUID;
|
||||
import java.util.logging.Level;
|
||||
import java.util.logging.Logger;
|
||||
import jline.ConsoleReader;
|
||||
|
@ -494,9 +495,9 @@ public final class CraftServer implements Server {
|
|||
return worlds.get(name.toLowerCase());
|
||||
}
|
||||
|
||||
public World getWorld(long uid) {
|
||||
public World getWorld(UUID uid) {
|
||||
for (World world : worlds.values()) {
|
||||
if (world.getUID() == uid) {
|
||||
if (world.getUID().equals(uid)) {
|
||||
return world;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -8,6 +8,8 @@ import java.util.ArrayList;
|
|||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Random;
|
||||
import java.util.UUID;
|
||||
|
||||
import net.minecraft.server.*;
|
||||
|
||||
import org.bukkit.entity.Arrow;
|
||||
|
@ -400,8 +402,8 @@ public class CraftWorld implements World {
|
|||
return world.worldData.getSeed();
|
||||
}
|
||||
|
||||
public long getUID() {
|
||||
return world.worldData.getWorldUID();
|
||||
public UUID getUID() {
|
||||
return world.getUUID();
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
Loading…
Reference in a new issue