Interface IPlayer<T extends net.minecraft.entity.player.EntityPlayerMP>

All Superinterfaces:
IEntity<T>, IEntityLivingBase<T>

public interface IPlayer<T extends net.minecraft.entity.player.EntityPlayerMP>
extends IEntityLivingBase<T>
  • Method Details

    • getDisplayName

      java.lang.String getDisplayName()
    • hasFinishedQuest

      boolean hasFinishedQuest​(int id)
    • hasActiveQuest

      boolean hasActiveQuest​(int id)
    • startQuest

      void startQuest​(int id)
    • factionStatus

      int factionStatus​(int factionId)
      Returns:
      Returns -1:Unfriendly, 0:Neutral, 1:Friendly
    • finishQuest

      void finishQuest​(int id)
      Add the quest from finished quest list
      Parameters:
      id - The Quest ID
    • stopQuest

      void stopQuest​(int id)
      Removes the quest from active quest list
      Parameters:
      id - The Quest ID
    • removeQuest

      void removeQuest​(int id)
      Removes the quest from active and finished quest list
      Parameters:
      id - The Quest ID
    • hasReadDialog

      boolean hasReadDialog​(int id)
    • showDialog

      void showDialog​(int id, java.lang.String name)
      Parameters:
      name - Name of the person talking in the dialog
    • removeDialog

      void removeDialog​(int id)
      Parameters:
      id - Removes the given id from the read dialogs list
    • addDialog

      void addDialog​(int id)
      Parameters:
      id - Adds the given id to the read dialogs
    • addFactionPoints

      void addFactionPoints​(int faction, int points)
      Parameters:
      faction - The faction id
      points - The points to increase. Use negative values to decrease
    • getFactionPoints

      int getFactionPoints​(int faction)
      Parameters:
      faction - The faction id
      Returns:
      points
    • message

      void message​(java.lang.String message)
    • getGamemode

      int getGamemode()
    • setGamemode

      void setGamemode​(int mode)
    • inventoryItemCount

      int inventoryItemCount​(IItemStack item)
      Deprecated.
      Use getInventory().count instead
    • inventoryItemCount

      int inventoryItemCount​(java.lang.String id, int damage)
      Deprecated.
      Use getInventory().count instead
    • getInventory

      IContainer getInventory()
      Returns:
      Returns a IItemStack array size 36
    • getInventoryHeldItem

      IItemStack getInventoryHeldItem()
      Returns:
      Returns the itemstack the player is currently holding in a container gui
    • removeItem

      boolean removeItem​(IItemStack item, int amount)
      Parameters:
      item - The Item type to be removed
      amount - How many will be removed
      Returns:
      Returns true if the items were removed succesfully. Returns false incase a bigger amount than what the player has was given
    • removeItem

      boolean removeItem​(java.lang.String id, int damage, int amount)
      Parameters:
      id - The items name
      damage - The damage value (give -1 for any damage value)
      amount - How many will be removed
      Returns:
      Returns true if the items were removed succesfully. Returns false incase a bigger amount than what the player has was given or item doesnt exist
    • removeAllItems

      void removeAllItems​(IItemStack item)
    • giveItem

      boolean giveItem​(IItemStack item)
      Parameters:
      item - Item to be added
      Returns:
      Returns whether or not it gave the item succesfully
    • giveItem

      boolean giveItem​(java.lang.String id, int damage, int amount)
      Parameters:
      id - The items name
      damage - The damage value
      amount - The amount of the item to be added
      Returns:
      Returns whether or not it gave the item succesfully
    • setSpawnpoint

      void setSpawnpoint​(int x, int y, int z)
      Same as the /spawnpoint command
      Parameters:
      x - The x position
      y - The y position
      z - The z position
    • resetSpawnpoint

      void resetSpawnpoint()
    • hasAchievement

      boolean hasAchievement​(java.lang.String achievement)
      Parameters:
      achievement - The achievement id. For a complete list see

      getExpLevel

      int getExpLevel()
    • setExpLevel

      void setExpLevel​(int level)
    • hasPermission

      boolean hasPermission​(java.lang.String permission)
    • getPixelmonData

      java.lang.Object getPixelmonData()
    • getTimers

      ITimers getTimers()
    • closeGui

      void closeGui()
    • getMCEntity

      T getMCEntity()
      Description copied from interface: IEntity
      Expert users only
      Specified by:
      getMCEntity in interface IEntity<T extends net.minecraft.entity.player.EntityPlayerMP>
      Specified by:
      getMCEntity in interface IEntityLivingBase<T extends net.minecraft.entity.player.EntityPlayerMP>
      Returns:
      Returns minecrafts entity
    • getSpawnPoint

      IBlock getSpawnPoint()
    • setSpawnPoint

      void setSpawnPoint​(IBlock block)
    • getHunger

      int getHunger()
    • setHunger

      void setHunger​(int level)
    • kick

      void kick​(java.lang.String message)
      Parameters:
      message - The message the player gets when kicked
    • sendNotification

      void sendNotification​(java.lang.String title, java.lang.String msg, int type)
      Parameters:
      title - Title of the notification
      msg - Message of the notification
      type - (0-3) notification background type
    • sendMail

      void sendMail​(IPlayerMail mail)
    • clearData

      void clearData()
      WANRING, REMOVES ALL PLAYER DATA (data only from CustomNPCs, does not clear inventory etc)
    • getActiveQuests

      IQuest[] getActiveQuests()
    • getFinishedQuests

      IQuest[] getFinishedQuests()
    • updatePlayerInventory

      void updatePlayerInventory()
      Syncs inventory changes to the client side. Also checks Item Quests for completion
    • playSound

      void playSound​(java.lang.String sound, float volume, float pitch)
      Parameters:
      sound - Sounds resource name
      volume - default 1
      pitch - default 1
    • showChestGui

      IContainer showChestGui​(int rows)
      Deprecated.
      Its better to use showCustomGui
      Parameters:
      rows - (1-6)
      Returns:
      Returns the IContainer of the chest gui
    • getOpenContainer

      IContainer getOpenContainer()
      Returns:
      Returns the container of the player if he has a container gui open. Returns the inventory container if none is open
    • canQuestBeAccepted

      boolean canQuestBeAccepted​(int id)
    • showCustomGui

      void showCustomGui​(ICustomGui gui)
      Open a ICustomGui to this player.
      Parameters:
      gui - Custom GUI to be displayed to the player.
    • getCustomGui

      ICustomGui getCustomGui()
      Returns:
      Returns the currently opened custom gui