package com.nicewuerfel.blockown;
import org.bukkit.World;
import java.io.Serializable;
import javax.annotation.Nonnull;
/**
* Represents an ownable object in the world.
*
* @author Pheasn
*/
public interface Ownable extends Serializable {
/**
* Returns the World the Ownable is in. Never null.
*
* @return the World
* @throws InvalidWorldNameException if the world referenced by the world name doesn't exist
*/
World getWorld() throws InvalidWorldNameException;
/**
* Returns the name of the world the Ownable is in. Never null.
*
* @return the world name
*/
String getWorldName();
/**
* Returns the {@link Material} of the {@link Ownable}.
*
* @return the {@link Material}
* @throws InvalidWorldNameException if the world referenced by the world name doesn't exist
*/
@Nonnull
Material getMaterial() throws InvalidWorldNameException;
}