Class CustomPlayer

java.lang.Object
com.jubiman.customplayerlib.CustomPlayer
Direct Known Subclasses:
CustomPlayerTickable

public abstract class CustomPlayer extends Object
The instance of each individual player containing custom data
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    protected final long
    The authentication of the player, used to access this object in the CustomPlayers registry
  • Constructor Summary

    Constructors
    Constructor
    Description
    CustomPlayer(long auth)
    Creates new CustomPlayer
  • Method Summary

    Modifier and Type
    Method
    Description
    abstract void
    addSaveData(necesse.engine.save.SaveData save)
    Save the player's data
    necesse.engine.save.SaveData
    Creates new save component
    abstract void
    loadEnter(necesse.engine.save.LoadData data)
    Load player's data from saved data.
    abstract void
    loadExit(necesse.engine.save.LoadData data)
    Load player's data from saved data.

    Methods inherited from class java.lang.Object

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

    • auth

      protected final long auth
      The 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