Inactive [FUN/DEV/RPG] NPCCreatures v1.4_02 - Spawn NPCs of any mob type! [1.2.5-R1.2]

Discussion in 'Inactive/Unsupported Plugins' started by Steveice10, Dec 20, 2011.

  1. Offline

    Steveice10

    [​IMG]
    NPCCreatures - Spawn NPCs of any mob type!
    NPCCreatures... what is this?

    For Server Admins
    You can spawn NPCs of any mob type you want - yes, even Enderdragons! - and if you (optionally) have Spout installed, you can give them overhead names.
    Code:
    /createnpc <name> [type]
    And yes, you can delete them, too.
    Code:
    /deletenpc <id>
    Note that you need the NPC ID, not the NPC name. To get the ID, look in the config.yml for the NPC's entry and get the ID from the section title.

    For Plugin Devs
    You can hook into this and spawn your own NPCs:

    Code:
    NPCManager npcManager = ((NPCCreatures)plugin.getServer().getPluginManager().getPlugin("NPCCreatures")).getNPCManager();
    npcManager.spawnNPC(name, location, type);


    And get an NPC from a Bukkit Entity:

    Code:
    if(entity instanceof NPC) {
        ...
    }
    You can also make them talk:

    Code:
    npc.say(message);
    npc.say(message, player);
    npc.say(message, playerList);
    npc.say(message, distance);





     
    kahlilnc likes this.
  2. Offline

    Gunpowder

    good plugin!
     
  3. Offline

    Ondechoc

    That's epic ! Do you intend do make them talk in the future ?

    EDIT: how do you remove one of them ?
     
  4. Offline

    Deleted user

    You sir, deserve a medal.
    Give that man a prize.
     
  5. Offline

    user_43347

    I have to ask, what makes this different then the other 5 NPC plugins?
     
  6. Offline

    Steveice10

    Thanks for the positive comments guys, updated the plugin to add a few more developer methods and fixed some bugs. Javadocs for developers coming sometime soon!

    As far as I know, there aren't any plugins that let you spawn an npc of any mob type, only human npcs.

    At the moment, delete them by deleting their entry in npcs.yml. npcs.yml is located in /(plugin folder here)/NPCCreatures. A delete command will be added soon.
     
  7. Offline

    user_43347

    Whoops, didn't see the "any mob" part, well done!
     
  8. Offline

    Steveice10

    Updated to v1.2, added Javadocs and a /deletenpc command.

    1.2.5 has been released to fix bugs, redo the config, and add a pickup option!

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: May 22, 2016
  9. Offline

    LeGenDaryX

    It doesnt work for me. :(

    When i do:

    /createnpc zombie zombie

    I get this error:

    Code:
    2011-12-22 10:04:50 [SEVERE] null
    org.bukkit.command.CommandException: Unhandled exception executing command 'createnpc' in plugin NPCCreatures v1.2
        at org.bukkit.command.PluginCommand.execute(PluginCommand.java:42)
        at org.bukkit.command.SimpleCommandMap.dispatch(SimpleCommandMap.java:165)
        at org.bukkit.craftbukkit.CraftServer.dispatchCommand(CraftServer.java:378)
        at net.minecraft.server.NetServerHandler.handleCommand(NetServerHandler.java:757)
        at net.minecraft.server.NetServerHandler.chat(NetServerHandler.java:722)
        at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:715)
        at net.minecraft.server.Packet3Chat.a(Packet3Chat.java:33)
        at net.minecraft.server.NetworkManager.b(NetworkManager.java:226)
        at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:93)
        at net.minecraft.server.NetworkListenThread.a(SourceFile:108)
        at net.minecraft.server.MinecraftServer.w(MinecraftServer.java:527)
        at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:425)
        at net.minecraft.server.ThreadServerApplication.run(SourceFile:457)
    Caused by: java.lang.NoClassDefFoundError: org/getspout/spoutapi/packet/SpoutPacket
        at tk.npccreatures.npcs.NPCManager.getNewNPC(NPCManager.java:195)
        at tk.npccreatures.npcs.NPCManager.spawnNPC(NPCManager.java:186)
        at tk.npccreatures.npcs.NPCManager.spawnNPC(NPCManager.java:159)
        at tk.npccreatures.NPCCreatures.onCommand(NPCCreatures.java:136)
        at org.bukkit.command.PluginCommand.execute(PluginCommand.java:40)
        ... 12 more
    Caused by: java.lang.ClassNotFoundException: org.getspout.spoutapi.packet.SpoutPacket
        at java.net.URLClassLoader$1.run(Unknown Source)
        at java.net.URLClassLoader$1.run(Unknown Source)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.net.URLClassLoader.findClass(Unknown Source)
        at org.bukkit.plugin.java.PluginClassLoader.findClass(PluginClassLoader.java:36)
        at org.bukkit.plugin.java.PluginClassLoader.findClass(PluginClassLoader.java:24)
        at java.lang.ClassLoader.loadClass(Unknown Source)
        at java.lang.ClassLoader.loadClass(Unknown Source)
        ... 17 more
    when i do
    /createnpc zombie

    It spawns a human with the name zombie.

    And when i delete the npc.. it says.. npc deleted. But the npc (human) still stands there.

    AND it didnt make a config for me. It made a map instead with the name "npcs.yml"
     
  10. Offline

    Steveice10

    1. That means you dont have Spout installed, we are working on fixing it.

    2. /createnpc zombie would give you a human named zombie because the first parameter of the command is name. to spawn a zombie npc, you would type /createnpc (name) zombie

    3. I'll look into it.

    4. Are you on the latest 1.2.5?
     
  11. Offline

    LeGenDaryX

    OOh ok didnt know it needed spout. Ill try it again with spout!
     
  12. Offline

    Steveice10

    Version 1.2.6 released, Spout requirement removed.
     
  13. Offline

    LeGenDaryX

    I did spawn the dragon. But was only possible in my main world. And i couldnt read anything in the config about his ID to delete him.

    Its a really cool plugin the dragon in my city looks nice!
     
  14. Offline

    Steveice10

    The config is formatted like this:
    Code:
    npcs:
      (ID):
        x: (x)
        name: (name)
        type: (npcType)
        world: (worldName)
        pitch: (pitch)
        yaw: (yaw)
        z: (z)
        y: (y)
    What you want to do is look for your npcs name in the config, and check whats in the place where I put (ID). Take that and do /deletenpc (what you found here).
     
  15. Offline

    Dec64

  16. Offline

    Steveice10

    Not sure if that error has something to do with the plugin at all, I'll look into it.

    EDIT: Was probably caused by another plugin you had, fix released.
     
  17. Offline

    LeGenDaryX

    Aahh after i restarted the server. The dragon in the second world spawned and it also written to the config! Everythings fine now xD
     
  18. Offline

    Jorn818

    it won't work for me is it because i dont have spout?? i get a error from the nms map, the magmacube won't work so i deleted it still won't work :(
     
  19. Offline

    Steveice10

    Can you post the error here?

    v1.2.6-hotfix 2 up for download.

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: May 22, 2016
  20. Offline

    Steveice10

    Updated for 1.1, enjoy :)
     
  21. Offline

    glub_glu

    When I create a NPC I get this error message :
    Code:
    08:19:24 [SEVERE] java.lang.NoSuchMethodError: tk.npccreatures.npcs.nms.NPCHuman
    .getBukkitEntity()Lorg/bukkit/craftbukkit/entity/CraftPlayer;
    08:19:24 [SEVERE]      at tk.npccreatures.npcs.nms.NPCHuman.a_(NPCHuman.java:55
    )
    08:19:24 [SEVERE]      at net.minecraft.server.EntityHuman.k(EntityHuman.java:3
    53)
    08:19:24 [SEVERE]      at net.minecraft.server.EntityHuman.d(EntityHuman.java:3
    45)
    08:19:24 [SEVERE]      at net.minecraft.server.EntityLiving.y_(EntityLiving.jav
    a:339)
    08:19:24 [SEVERE]      at net.minecraft.server.EntityHuman.y_(EntityHuman.java:
    159)
    08:19:24 [SEVERE]      at net.minecraft.server.EntityPlayer.a(EntityPlayer.java
    :226)
    08:19:24 [SEVERE]      at net.minecraft.server.NetServerHandler.a(NetServerHand
    ler.java:316)
    08:19:24 [SEVERE]      at net.minecraft.server.Packet10Flying.handle(SourceFile
    :126)
    08:19:24 [SEVERE]      at net.minecraft.server.NetworkManager.b(NetworkManager.
    java:226)
    08:19:24 [SEVERE]      at net.minecraft.server.NetServerHandler.a(NetServerHand
    ler.java:100)
    08:19:24 [SEVERE]      at net.minecraft.server.NetworkListenThread.a(SourceFile
    :108)
    08:19:24 [SEVERE]      at net.minecraft.server.MinecraftServer.w(MinecraftServe
    r.java:536)
    08:19:24 [SEVERE]      at net.minecraft.server.MinecraftServer.run(MinecraftSer
    ver.java:434)
    08:19:24 [SEVERE]      at net.minecraft.server.ThreadServerApplication.run(Sour
    ceFile:465)
    08:19:24 [SEVERE] Unexpected exception
    java.lang.NoSuchMethodError: tk.npccreatures.npcs.nms.NPCHuman.getBukkitEntity()
    Lorg/bukkit/craftbukkit/entity/CraftPlayer;
            at tk.npccreatures.npcs.nms.NPCHuman.a_(NPCHuman.java:55)
            at net.minecraft.server.EntityHuman.k(EntityHuman.java:353)
            at net.minecraft.server.EntityHuman.d(EntityHuman.java:345)
            at net.minecraft.server.EntityLiving.y_(EntityLiving.java:339)
            at net.minecraft.server.EntityHuman.y_(EntityHuman.java:159)
            at net.minecraft.server.EntityPlayer.a(EntityPlayer.java:226)
            at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:316)
            at net.minecraft.server.Packet10Flying.handle(SourceFile:126)
            at net.minecraft.server.NetworkManager.b(NetworkManager.java:226)
            at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:100)
            at net.minecraft.server.NetworkListenThread.a(SourceFile:108)
            at net.minecraft.server.MinecraftServer.w(MinecraftServer.java:536)
            at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:434)
            at net.minecraft.server.ThreadServerApplication.run(SourceFile:465)
    >
    and the server crashes
     
  22. Offline

    Steveice10

    Hmm, I'll look into it. You are on 1.1-R3 right?
     
  23. Offline

    glub_glu

    Right
     
  24. Offline

    Steveice10

    I can't reproduce that error. From the looks of it, it would happen if you weren't on 1.1-R3.
     
  25. Offline

    glub_glu

    Ah sorry, I checked again and I forgot to edit the RUN.bat to 1.1-r3, sorry to take your time, and it's a great plugin!
     
  26. Offline

    biblelucas

    How do i change the skins?
    for the human npcs?
     
  27. Offline

    md_5

    Latest rb please
     
  28. Offline

    Steveice10

    Updated for 1.2.4-R1.0 and fixed bugs!
     
  29. Offline

    IdealIdeas

    You should try to talk to the guy who makes citizens and have these 2 plugins combined into 1!
     
  30. I want to get this if i can have them set up as a kind of guide for new players im not sure if i understand this plugin so i dont know if this is possible. like a [sheep] that gives you a tour of the server or tells you the rules.I would name him.... Sheepy.
     

Share This Page