Interface IPlayerData


  • public interface IPlayerData
    Provides access to all persistent data categories for a player, including companion, dialog, quest, faction, transport, mail, trade, and ability data.
    • Method Detail

      • setCompanion

        void setCompanion​(ICustomNpc npc)
        Sets the player's companion NPC.
        Parameters:
        npc - the companion NPC, or null to clear.
      • getCompanion

        ICustomNpc getCompanion()
        Returns the player's companion NPC.
        Returns:
        the companion NPC, or null if none.
      • hasCompanion

        boolean hasCompanion()
        Returns:
        true if the player currently has a companion NPC.
      • getCompanionID

        int getCompanionID()
        Returns:
        the entity ID of the companion, or -1 if none.
      • getDialogData

        IPlayerDialogData getDialogData()
        Returns:
        the player's dialog data.
      • getBankData

        IPlayerBankData getBankData()
        Returns:
        the player's bank data.
      • getQuestData

        IPlayerQuestData getQuestData()
        Returns:
        the player's quest data.
      • getMailData

        IPlayerMailData getMailData()
        Returns:
        the player's mail data.
      • getTradeData

        IPlayerTradeData getTradeData()
        Returns:
        the player's trade data.
      • save

        void save()
        Saves all player data to disk.