Class NpcAPI


public abstract class NpcAPI
extends java.lang.Object
Note this API should only be used Server side not on the client
  • Constructor Details

    • NpcAPI

      public NpcAPI()
  • Method Details

    • createNPC

      public abstract ICustomNpc createNPC​( world)
      Doesnt spawn the npc in the world
    • spawnNPC

      public abstract ICustomNpc spawnNPC​( world, int x, int y, int z)
      Creates and spawns an npc
    • getIEntity

      public abstract IEntity getIEntity​(net.minecraft.entity.Entity entity)
    • getIBlock

      public abstract IBlock getIBlock​( world, net.minecraft.util.math.BlockPos pos)
    • getIContainer

      public abstract IContainer getIContainer​(net.minecraft.inventory.IInventory inventory)
    • getIContainer

      public abstract IContainer getIContainer​(net.minecraft.inventory.Container container)
    • getIItemStack

      public abstract IItemStack getIItemStack​(net.minecraft.item.ItemStack itemstack)
    • getIWorld

      public abstract IWorld getIWorld​( world)
    • getIWorld

      public abstract IWorld getIWorld​(int dimensionId)
    • getIWorlds

      public abstract IWorld[] getIWorlds()
    • getINbt

      public abstract INbt getINbt​(net.minecraft.nbt.NBTTagCompound compound)
    • getIPos

      public abstract IPos getIPos​(double x, double y, double z)
    • getFactions

      public abstract IFactionHandler getFactions()
    • getRecipes

      public abstract IRecipeHandler getRecipes()
    • getQuests

      public abstract IQuestHandler getQuests()
    • getDialogs

      public abstract IDialogHandler getDialogs()
    • getClones

      public abstract ICloneHandler getClones()
    • getIDamageSource

      public abstract IDamageSource getIDamageSource​(net.minecraft.util.DamageSource damagesource)
    • stringToNbt

      public abstract INbt stringToNbt​(java.lang.String str)
    • createMail

      public abstract IPlayerMail createMail​(java.lang.String sender, java.lang.String subject)
    • createCustomGui

      public abstract ICustomGui createCustomGui​(int id, int width, int height, boolean pauseGame)
    • getRawPlayerData

      public abstract INbt getRawPlayerData​(java.lang.String uuid)
      Get player data even if they are offline
      uuid -
    • events

      public abstract net.minecraftforge.fml.common.eventhandler.EventBus events()
      Used by modders
      The event bus where you register CustomNPCEvents
    • registerCommand

      public abstract void registerCommand​(CommandNoppesBase command)
      Use to register your own /noppes subcommand
    • getGlobalDir

      public abstract getGlobalDir()
      Returns the .minecraft/customnpcs folder or [yourserverfolder]/customnpcs
    • getWorldDir

      public abstract getWorldDir()
      Returns the .minecraft/saves/[yourworld]/customnpcs folder or [yourserverfolder]/[yourworld]/customnpcs
    • IsAvailable

      public static boolean IsAvailable()
    • Instance

      public static NpcAPI Instance()
    • registerPermissionNode

      public abstract void registerPermissionNode​(java.lang.String permission, int defaultType)
      permission - Permission node, best if it's lowercase and contains '.' (e.g. "modid.subgroup.permission_id")
      defaultType - 0:ALL, 1:OP, 2:NONE. This determines who can use the permission by default everybody, only ops or nobody
    • hasPermissionNode

      public abstract boolean hasPermissionNode​(java.lang.String permission)
    • executeCommand

      public abstract java.lang.String executeCommand​(IWorld world, java.lang.String command)
      world - The world in which the command is executed
      command - The Command to execute
    • getRandomName

      public abstract java.lang.String getRandomName​(int dictionary, int gender)
      dictionary - 0:roman, 1:japanese, 2:slavic, 3:welsh, 4:saami, 5:old-norse, 6:ancient-greek, 7:aztec, 8:classic-cnpcs, 9:spanish
      gender - 0:random, 1:male, 2:female
      Returns a randomly generated name