Class GroupSettings

java.lang.Object
com.sucy.skill.data.GroupSettings

public class GroupSettings extends Object
Settings for class groups
  • Constructor Summary

    Constructors
    Constructor
    Description
    Initializes group settings with default settings
    GroupSettings(mc.promcteam.engine.mccore.config.parse.DataSection config)
    Initializes a new set of settings for a class group by loading settings from the config
  • Method Summary

    Modifier and Type
    Method
    Description
    int
    getAttribsForLevels(int newLevel, int oldLevel)
    Gets the number of attribute points to gain for a specified level
    Retrieves the default class of the group
    Gets the permission required by the group
    int
    getPointsForLevels(int newLevel, int oldLevel)
    Gets the number of skill points to gain for a specified level
    boolean
    Retrieves whether the group requires a permission to use at all
    void
    save(mc.promcteam.engine.mccore.config.parse.DataSection config)
    Saves the group settings to a config

    Methods inherited from class java.lang.Object

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

    • GroupSettings

      public GroupSettings()
      Initializes group settings with default settings
    • GroupSettings

      public GroupSettings(mc.promcteam.engine.mccore.config.parse.DataSection config)
      Initializes a new set of settings for a class group by loading settings from the config
      Parameters:
      config - config to load from
  • Method Details

    • getDefault

      public RPGClass getDefault()
      Retrieves the default class of the group
      Returns:
      default class of the group or null/"none" if none
    • requiresPermission

      public boolean requiresPermission()
      Retrieves whether the group requires a permission to use at all
      Returns:
      true if requires a permission, false otherwise
    • getPermission

      public String getPermission()
      Gets the permission required by the group
      Returns:
      required permission or null if none
    • getPointsForLevels

      public int getPointsForLevels(int newLevel, int oldLevel)
      Gets the number of skill points to gain for a specified level
      Parameters:
      newLevel - level to check for
      oldLevel - level coming from
      Returns:
      gained points
    • getAttribsForLevels

      public int getAttribsForLevels(int newLevel, int oldLevel)
      Gets the number of attribute points to gain for a specified level
      Parameters:
      newLevel - level to check for
      oldLevel - level coming from
      Returns:
      gained points
    • save

      public void save(mc.promcteam.engine.mccore.config.parse.DataSection config)
      Saves the group settings to a config
      Parameters:
      config - config to save to