Constructor and Description |
---|
Owner() |
Modifier and Type | Method and Description |
---|---|
String |
getOwner()
Gets the owner.
|
UUID |
getOwnerId() |
boolean |
isOwnedBy(org.bukkit.command.CommandSender sender)
Gets if the given
CommandSender is the owner of an NPC. |
boolean |
isOwnedBy(String name) |
void |
load(DataKey key)
Loads a trait.
|
void |
save(DataKey key)
Saves a trait.
|
void |
setOwner(org.bukkit.command.CommandSender sender) |
void |
setOwner(String owner)
Sets the owner of an NPC.
|
void |
setOwner(String owner,
UUID uuid)
Sets the owner of an NPC.
|
String |
toString() |
public static final String SERVER
public String getOwner()
public UUID getOwnerId()
null
if the owner is the server or a UUID has not been collected for
the owner.public boolean isOwnedBy(org.bukkit.command.CommandSender sender)
CommandSender
is the owner of an NPC.sender
- Sender to checkpublic boolean isOwnedBy(String name)
public void load(DataKey key) throws NPCLoadException
Trait
load
in class Trait
key
- DataKey to load fromNPCLoadException
- Thrown if this trait failed to load properlypublic void setOwner(org.bukkit.command.CommandSender sender)
public void setOwner(String owner)
owner
- Name of the player to set as owner of an NPCpublic void setOwner(String owner, UUID uuid)
owner
- Name of the owneruuid
- UUID of the ownerCopyright © 2021. All rights reserved.