Package com.sucy.skill.data
Class GroupSettings
java.lang.Object
com.sucy.skill.data.GroupSettings
Settings for class groups
-
Constructor Summary
ConstructorsConstructorDescriptionInitializes group settings with default settingsGroupSettings(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 TypeMethodDescriptionintgetAttribsForLevels(int newLevel, int oldLevel) Gets the number of attribute points to gain for a specified levelRetrieves the default class of the groupGets the permission required by the groupintgetPointsForLevels(int newLevel, int oldLevel) Gets the number of skill points to gain for a specified levelbooleanRetrieves whether the group requires a permission to use at allvoidsave(mc.promcteam.engine.mccore.config.parse.DataSection config) Saves the group settings to a config
-
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
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
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 foroldLevel- 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 foroldLevel- 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
-