Package net.citizensnpcs.trait
Class CommandTrait
java.lang.Object
net.citizensnpcs.api.trait.Trait
net.citizensnpcs.trait.CommandTrait
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic enum
static enum
static enum
static class
static class
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionint
addCommand
(CommandTrait.NPCCommandBuilder builder) void
clear()
void
clearHistory
(CommandTrait.CommandTraitError which, UUID who) void
clearPlayerHistory
(UUID who) void
describe
(CommandSender sender) Send a brief description of the current state of the trait to the suppliedCommandSender
.void
dispatch
(Player player, CommandTrait.Hand handIn) double
getCost()
int
boolean
hasCommandId
(int id) boolean
boolean
void
removeCommandById
(int id) void
Saves a trait.void
setCost
(double cost) void
setCustomErrorMessage
(CommandTrait.CommandTraitError which, String message) void
void
setExperienceCost
(int experienceCost) void
setHideErrorMessages
(boolean hide) void
setPersistSequence
(boolean persistSequence) void
setTemporaryPermissions
(List<String> permissions) void
setTemporaryPermissions
(List<String> permissions, int duration)
-
Constructor Details
-
CommandTrait
public CommandTrait()
-
-
Method Details
-
addCommand
-
clear
public void clear() -
clearHistory
-
clearPlayerHistory
-
describe
Send a brief description of the current state of the trait to the suppliedCommandSender
. -
dispatch
-
getCost
public double getCost() -
getExecutionMode
-
getExperienceCost
public int getExperienceCost() -
hasCommandId
public boolean hasCommandId(int id) -
isHideErrorMessages
public boolean isHideErrorMessages() -
persistSequence
public boolean persistSequence() -
removeCommandById
public void removeCommandById(int id) -
save
Description copied from class:Trait
Saves a trait. -
setCost
public void setCost(double cost) -
setCustomErrorMessage
-
setExecutionMode
-
setExperienceCost
public void setExperienceCost(int experienceCost) -
setHideErrorMessages
public void setHideErrorMessages(boolean hide) -
setPersistSequence
public void setPersistSequence(boolean persistSequence) -
setTemporaryPermissions
-
setTemporaryPermissions
-