Package studio.magemonkey.fabled.data
Class GroupSettings
java.lang.Object
studio.magemonkey.fabled.data.GroupSettings
Settings for class groups
-
Constructor Summary
ConstructorsConstructorDescriptionInitializes group settings with default settingsGroupSettings
(studio.magemonkey.codex.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 TypeMethodDescriptionboolean
canReset()
int
getAttribsForLevels
(int newLevel, int oldLevel) Gets the number of attribute points to gain for a specified leveldouble
Retrieves the number of attribute points gained each leveldouble
Retrieves the death penalty for classes in this groupRetrieves the default class of the groupGets the permission required by the groupint
getPointsForLevels
(int newLevel, int oldLevel) Gets the number of skill points to gain for a specified leveldouble
Retrieves the number of skill points gained in the group per levelint
int
Retrieves the number of skill points classes in this group start withboolean
boolean
boolean
boolean
Checks whether classes reset upon profession in the groupboolean
boolean
Retrieves whether the group requires a permission to use at allvoid
save
(studio.magemonkey.codex.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(studio.magemonkey.codex.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(studio.magemonkey.codex.mccore.config.parse.DataSection config) Saves the group settings to a config- Parameters:
config
- config to save to
-
isProfessReset
public boolean isProfessReset()Checks whether classes reset upon profession in the group- Returns:
- true if resets upon profession, false otherwise
-
isProfessRefundSkills
public boolean isProfessRefundSkills() -
isProfessRefundAttributes
public boolean isProfessRefundAttributes() -
isShowScoreboard
public boolean isShowScoreboard()- Returns:
- Whether to show the scoreboard or not
-
canReset
public boolean canReset()- Returns:
- true if the group is allowed to reset, false otherwise
-
isFriendly
public boolean isFriendly()- Returns:
- true if players with the same class under this group are allies
-
getDeathPenalty
public double getDeathPenalty()Retrieves the death penalty for classes in this group- Returns:
- death penalty
-
getStartingPoints
public int getStartingPoints()Retrieves the number of skill points classes in this group start with- Returns:
- starting skill points
-
getPointsPerLevel
public double getPointsPerLevel()Retrieves the number of skill points gained in the group per level- Returns:
- skill points per level
-
getAttribsPerLevel
public double getAttribsPerLevel()Retrieves the number of attribute points gained each level- Returns:
- attribute points gained each level
-
getStartingAttribs
public int getStartingAttribs()- Returns:
- attribute points classes in the group start with
-