Package com.jubiman.customplayerlib
Class CustomPlayer
java.lang.Object
com.jubiman.customplayerlib.CustomPlayer
- Direct Known Subclasses:
CustomPlayerTickable
The instance of each individual player containing custom data
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final longThe authentication of the player, used to access this object in the CustomPlayers registry -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionabstract voidaddSaveData(necesse.engine.save.SaveData save) Save the player's datanecesse.engine.save.SaveDataCreates new save componentabstract voidloadEnter(necesse.engine.save.LoadData data) Load player's data from saved data.abstract voidloadExit(necesse.engine.save.LoadData data) Load player's data from saved data.
-
Field Details
-
auth
protected final long authThe authentication of the player, used to access this object in the CustomPlayers registry
-
-
Constructor Details
-
CustomPlayer
public CustomPlayer(long auth) Creates new CustomPlayer- Parameters:
auth- the authentication of the player
-
-
Method Details
-
generatePlayerSave
public necesse.engine.save.SaveData generatePlayerSave()Creates new save component- Returns:
- a SaveData component with name of the player's auth
-
addSaveData
public abstract void addSaveData(necesse.engine.save.SaveData save) Save the player's data- Parameters:
save- save parent object to add to
-
loadEnter
public abstract void loadEnter(necesse.engine.save.LoadData data) Load player's data from saved data. Gets called before the rest of the player is loaded.- Parameters:
data- the data to load
-
loadExit
public abstract void loadExit(necesse.engine.save.LoadData data) Load player's data from saved data. Gets called before the rest of the player is loaded.- Parameters:
data- the data to load
-