public class OwnedEntity extends Object implements Ownable
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(Object obj) |
org.bukkit.entity.Entity |
getEntity()
Gets the entity corresponding to this OwnedEntity.
|
Material |
getMaterial()
Returns the Material of the Ownable.
|
UUID |
getUniqueId() |
org.bukkit.World |
getWorld()
Returns the World the Ownable is in.
|
String |
getWorldName()
Returns the name of the world the Ownable is in.
|
int |
hashCode() |
boolean |
isLiving()
Checks if the entity is living.
|
static OwnedEntity |
newInstance(org.bukkit.entity.Entity entity)
Creates a new OwnedEntity instance holding a WeakReference to the given block.
|
static OwnedEntity |
newInstance(UUID id,
String worldName)
Creates a new OwnedEntity instance.
|
static OwnedEntity |
newInstance(UUID id,
String worldName,
Material material)
Creates a new OwnedEntity instance.
|
String |
toString() |
public static OwnedEntity newInstance(org.bukkit.entity.Entity entity)
entity - the entitypublic static OwnedEntity newInstance(UUID id, String worldName, Material material)
id - the UUIDworldName - the worldNamematerial - the materialpublic static OwnedEntity newInstance(UUID id, String worldName)
id - the UUIDworldName - the worldNamepublic org.bukkit.entity.Entity getEntity()
throws InvalidWorldException,
InvalidUUIDException
InvalidWorldException - if the world name is invalidInvalidUUIDException - if the entity can't be found in the specified worldpublic UUID getUniqueId()
public org.bukkit.World getWorld()
throws InvalidWorldException
OwnablegetWorld in interface OwnableInvalidWorldException - if the world referenced by the world name doesn't existpublic String getWorldName()
OwnablegetWorldName in interface Ownablepublic Material getMaterial() throws InvalidWorldException
OwnablegetMaterial in interface OwnableInvalidWorldException - if the world referenced by the world name doesn't existpublic boolean isLiving()
throws InvalidWorldException,
InvalidUUIDException
InvalidWorldException - if the world name is invalidInvalidUUIDException - if the entity can't be found in the specified worldCopyright © 2015. All rights reserved.