Package net.citizensnpcs.api.trait.trait
Class Owner
java.lang.Object
net.citizensnpcs.api.trait.Trait
net.citizensnpcs.api.trait.trait.Owner
Represents the owner of an NPC.
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptiongetOwner()
Deprecated.boolean
boolean
boolean
isOwnedBy
(CommandSender sender) Gets if the givenCommandSender
is the owner of an NPC.void
Deprecated.void
Deprecated.void
void
setOwner
(CommandSender sender) toString()
-
Constructor Details
-
Owner
public Owner()
-
-
Method Details
-
getOwner
Deprecated.Gets the owner.- Returns:
- "SERVER" or the UUID string
-
getOwnerId
- Returns:
- The owner's UUID, or
null
if the owner is the server or a UUID has not been collected for the owner.
-
isOwnedBy
Gets if the givenCommandSender
is the owner of an NPC.- Parameters:
sender
- Sender to check- Returns:
- Whether the sender is the owner of an NPC
-
isOwnedBy
-
isOwnedBy
-
setOwner
-
setOwner
Deprecated.Sets the owner of an NPC.- Parameters:
owner
- Name of the player to set as owner of an NPC
-
setOwner
Deprecated.Sets the owner of an NPC.- Parameters:
owner
- Name of the owneruuid
- UUID of the owner
-
setOwner
-
toString
-