Class CommandTrait

java.lang.Object
net.citizensnpcs.api.trait.Trait
net.citizensnpcs.trait.CommandTrait
All Implemented Interfaces:
Runnable, Listener

public class CommandTrait extends Trait
  • Constructor Details

    • CommandTrait

      public CommandTrait()
  • Method Details

    • addCommand

      public int addCommand(CommandTrait.NPCCommandBuilder builder)
    • clear

      public void clear()
    • clearHistory

      public void clearHistory(CommandTrait.CommandTraitError which, UUID who)
    • clearPlayerHistory

      public void clearPlayerHistory(UUID who)
    • describe

      public void describe(CommandSender sender)
      Send a brief description of the current state of the trait to the supplied CommandSender.
    • dispatch

      public void dispatch(Player player, CommandTrait.Hand handIn)
    • getCost

      public double getCost()
    • getExecutionMode

      public CommandTrait.ExecutionMode 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

      public void save(DataKey key)
      Description copied from class: Trait
      Saves a trait.
      Overrides:
      save in class Trait
      Parameters:
      key - DataKey to save to
    • setCost

      public void setCost(double cost)
    • setCustomErrorMessage

      public void setCustomErrorMessage(CommandTrait.CommandTraitError which, String message)
    • setExecutionMode

      public void setExecutionMode(CommandTrait.ExecutionMode mode)
    • setExperienceCost

      public void setExperienceCost(int experienceCost)
    • setHideErrorMessages

      public void setHideErrorMessages(boolean hide)
    • setPersistSequence

      public void setPersistSequence(boolean persistSequence)
    • setTemporaryPermissions

      public void setTemporaryPermissions(List<String> permissions)