Class DirectlyDefinedReward

java.lang.Object
com.bencodez.advancedcore.api.rewards.DirectlyDefinedReward
All Implemented Interfaces:
DefinedReward

public abstract class DirectlyDefinedReward extends Object implements DefinedReward
Abstract class for directly defined rewards.
  • Constructor Details

    • DirectlyDefinedReward

      public DirectlyDefinedReward(String path)
      Instantiates a new directly defined reward.
      Parameters:
      path - the path
  • Method Details

    • createSection

      public abstract void createSection(String key)
      Description copied from interface: DefinedReward
      Creates a section.
      Specified by:
      createSection in interface DefinedReward
      Parameters:
      key - the key
    • createSectionLocal

      public void createSectionLocal(String key)
      Creates a local section.
      Parameters:
      key - the key
    • getFileData

      public abstract org.bukkit.configuration.ConfigurationSection getFileData()
      Description copied from interface: DefinedReward
      Gets the file data.
      Specified by:
      getFileData in interface DefinedReward
      Returns:
      the file data
    • getFullPath

      public String getFullPath()
      Gets the full path.
      Specified by:
      getFullPath in interface DefinedReward
      Returns:
      the full path
    • getReward

      public Reward getReward()
      Gets the reward.
      Returns:
      the reward
    • getValue

      public Object getValue(String path)
      Gets the value.
      Parameters:
      path - the path
      Returns:
      the value
    • isDirectlyDefined

      public boolean isDirectlyDefined()
      Checks if directly defined.
      Returns:
      true if directly defined
    • needsDot

      public String needsDot()
      Description copied from interface: DefinedReward
      Needs dot separator.
      Specified by:
      needsDot in interface DefinedReward
      Returns:
      the dot string
    • save

      public abstract void save()
      Description copied from interface: DefinedReward
      Saves the configuration.
      Specified by:
      save in interface DefinedReward
    • setData

      public abstract void setData(String path, Object value)
      Description copied from interface: DefinedReward
      Sets the data.
      Specified by:
      setData in interface DefinedReward
      Parameters:
      path - the path
      value - the value
    • setParentValue

      public void setParentValue(Object value)
      Sets the parent value.
      Parameters:
      value - the value
    • setValue

      public void setValue(String path, Object value)
      Sets the value.
      Parameters:
      path - the path
      value - the value