Class Settings

java.lang.Object
dev.foxikle.customnpcs.data.Settings

public class Settings extends Object
A class holding the data for an NPC's settings
  • Constructor Summary

    Constructors
    Constructor
    Description
    Creates a settings with defaults.
    Settings(boolean interactable, boolean tunnelvision, boolean resilient, double direction, String value, String signature, String skinName, String name)
    Deprecated.
    Settings(boolean interactable, boolean tunnelvision, boolean resilient, double direction, String value, String signature, String skinName, String name, String customInteractableHologram, boolean hideClickableHologram)
    Creates a settings object with the specified settings
  • Method Summary

    Modifier and Type
    Method
    Description
     
    gets the NPC's name in serialized minimessage format.
    void
    setName(net.kyori.adventure.text.Component name)
    Sets the name of the npc
    void
    setSkinData(String signature, String value, String skinName)
    Sets the skin data in on fell swoop

    Methods inherited from class java.lang.Object

    equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • Settings

      @Deprecated @ScheduledForRemoval(inVersion="1.7") public Settings(boolean interactable, boolean tunnelvision, boolean resilient, double direction, String value, String signature, String skinName, String name)
      Deprecated.
      Creates a settings object with the specified settings
      Parameters:
      interactable - If the npc has actions to execute
      tunnelvision - If the npc will look at players
      resilient - If the npc will persist on restarts
      direction - The direction to look
      value - The value of the npc's skin
      signature - The signature of the npc's skin
      skinName - The name of the skin as it is referenced in the Menu
      name - The name of NPC formatted in SERIALIZED minimessage format
    • Settings

      public Settings(boolean interactable, boolean tunnelvision, boolean resilient, double direction, String value, String signature, String skinName, String name, String customInteractableHologram, boolean hideClickableHologram)
      Creates a settings object with the specified settings
      Parameters:
      interactable - If the npc has actions to execute
      tunnelvision - If the npc will look at players
      resilient - If the npc will persist on restarts
      direction - The direction to look
      value - The value of the npc's skin
      signature - The signature of the npc's skin
      skinName - The name of the skin as it is referenced in the Menu
      name - The name of NPC formatted in SERIALIZED minimessage format
      customInteractableHologram - The custom hologram
      hideClickableHologram - If the NPC's Clickable hologram should be hidden
    • Settings

      public Settings()
      Creates a settings with defaults.
  • Method Details

    • getName

      public String getName()
      gets the NPC's name in serialized minimessage format.
      Returns:
      the NPC's serialized name
    • setName

      public void setName(net.kyori.adventure.text.Component name)
      Sets the name of the npc
      Parameters:
      name - as a component
    • setSkinData

      public void setSkinData(String signature, String value, String skinName)
      Sets the skin data in on fell swoop
      Parameters:
      signature - the skin signature
      value - the skin value
      skinName - the cosmetic name
    • clone

      public Settings clone()
      Overrides:
      clone in class Object