Interface ICustomNpc<T extends net.minecraft.entity.EntityCreature>

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

public interface ICustomNpc<T extends net.minecraft.entity.EntityCreature>
extends IEntityLiving<T>
  • Method Details

    • getDisplay

      INPCDisplay getDisplay()
    • getInventory

      INPCInventory getInventory()
    • getStats

      INPCStats getStats()
    • getAi

      INPCAi getAi()
    • getAdvanced

      INPCAdvanced getAdvanced()
    • getFaction

      IFaction getFaction()
    • setFaction

      void setFaction​(int id)
    • getRole

      INPCRole getRole()
    • getJob

      INPCJob getJob()
    • getTimers

      ITimers getTimers()
    • getHomeX

      int getHomeX()
    • getHomeY

      int getHomeY()
    • getHomeZ

      int getHomeZ()
    • getOwner

      IEntityLivingBase getOwner()
      Incase the npc is a Follower or Companion it will return the one who its following. Also works for scene followers
    • setHome

      void setHome​(int x, int y, int z)
    • reset

      void reset()
      Basically completely resets the npc. This will also call the Init script
    • say

      void say​(java.lang.String message)
    • sayTo

      void sayTo​(IPlayer player, java.lang.String message)
    • shootItem

      IProjectile shootItem​(IEntityLivingBase target, IItemStack item, int accuracy)
      item - The item you want to shoot
      accuracy - Accuracy of the shot (1-100)
    • shootItem

      IProjectile shootItem​(double x, double y, double z, IItemStack item, int accuracy)
      item - The item you want to shoot
      accuracy - Accuracy of the shot (1-100)
    • giveItem

      void giveItem​(IPlayer player, IItemStack item)
      If the player can't carry the item it will fall on the ground. (unless the player is in creative)
    • setDialog

      void setDialog​(int slot, IDialog dialog)
      slot - (0-11)
    • getDialog

      IDialog getDialog​(int slot)
      slot - (0-11)
    • updateClient

      void updateClient()
      Force update client. Normally it updates client once every 10 ticks
    • executeCommand

      java.lang.String executeCommand​(java.lang.String command)
      On servers the enable-command-block option in the needs to be set to true
      Use /gamerule commandBlockOutput false/true to turn off/on command block feedback
      Setting NpcUseOpCommands to true in the CustomNPCs.cfg should allow the npc to run op commands, be warned this could be a major security risk, use at own risk
      For permission plugins the commands are run under uuid:c9c843f8-4cb1-4c82-aa61-e264291b7bd6 and name:[customnpcs]
      command - The command to be executed
      Returns the commands output