#1046: Make World implement Keyed

By: pop4959 <pop4959@gmail.com>
This commit is contained in:
CraftBukkit/Spigot 2022-05-09 18:07:51 +10:00
parent aba0972e9a
commit 98756897b7

View file

@ -75,6 +75,7 @@ import org.bukkit.Effect;
import org.bukkit.FluidCollisionMode;
import org.bukkit.GameRule;
import org.bukkit.Location;
import org.bukkit.NamespacedKey;
import org.bukkit.Particle;
import org.bukkit.Raid;
import org.bukkit.Sound;
@ -581,6 +582,11 @@ public class CraftWorld extends CraftRegionAccessor implements World {
return world.uuid;
}
@Override
public NamespacedKey getKey() {
return CraftNamespacedKey.fromMinecraft(world.dimension().location());
}
@Override
public String toString() {
return "CraftWorld{name=" + getName() + '}';