ClassManager
public class CoreClassManager extends java.lang.Object implements ClassManager
Constructor | Description |
---|---|
CoreClassManager(Game game) |
Modifier and Type | Method | Description |
---|---|---|
boolean |
deleteClass(java.lang.String name) |
Deletes a class from memory and storage with the specified name.
|
GameClass |
getClass(java.lang.String name) |
Returns the GameClass object with a specific name.
|
org.bukkit.inventory.ItemStack |
getClassSelector() |
Gets the class selector item, which may be clicked to open the class selection menu.
|
GameClass |
getRandomClass(GamePlayer player) |
Scans classes in a random order for one the player has permission for.
|
void |
loadClasses() |
Loads classes from the classes.yml file, which is contained in the resources folder of the game.
|
void |
openGUI(GamePlayer player) |
Opens the class selection GUI for a specific entity.
|
public CoreClassManager(Game game)
public void loadClasses()
ClassManager
loadClasses
in interface ClassManager
public void openGUI(GamePlayer player)
ClassManager
openGUI
in interface ClassManager
player
- the GamePlayer object of the entity to open the GUI forpublic GameClass getClass(java.lang.String name)
ClassManager
getClass
in interface ClassManager
name
- the name of the desired classpublic boolean deleteClass(java.lang.String name)
ClassManager
deleteClass
in interface ClassManager
name
- the name of the class to deletepublic GameClass getRandomClass(GamePlayer player)
ClassManager
getRandomClass
in interface ClassManager
player
- the player to find a class forpublic org.bukkit.inventory.ItemStack getClassSelector()
ClassManager
getClassSelector
in interface ClassManager