
package de.craftolution.craftoplugin.module.treasure.hunt.utils;

import org.bukkit.Location;
import org.bukkit.World;

import java.util.Objects;
import java.util.UUID;

public class Position extends Location {

	private final UUID worldId;

	public Position(World world, double x, double y, double z) {
		super(world, x, y, z);
		this.worldId = world.getUID();
	}

	public Position(World world, double x, double y, double z, float yaw, float pitch) {
		super(world, x, y, z, yaw, pitch);
		this.worldId = world.getUID();
	}

	public Position(Location location) {
		super(location.getWorld(), location.getX(), location.getY(), location.getZ());
		this.worldId = Objects.requireNonNull(location.getWorld()).getUID();
	}

	public UUID getWorldId() { return worldId; }

}
