NpcSpawner lib - spawn basic NPCs

Discussion in 'Resources' started by Redecouverte, Feb 3, 2011.

Thread Status:
Not open for further replies.
  1. Offline


    Hi there everyone,
    I'm developing a plugin called Minequest and could use some help related to npcs. I had some old code that the previous developer used but it seems that it's not working correctly anymore. It seems that when you create an npc they will not respawn when the server is restarted. There is also a problem that when you type in the spawn command, you have to type it again to make it work. I've heard other people have run into similar problems but I've had trouble finding the fix for it. Here is the link to my code for use with
    svn: I'm guessing the problem lies inside my old npclib. If someone could take a look at it, I would be extremely grateful. Thank you.
  2. Offline


    1. Update to this version of the NPCLib:
    2. Stop using svn, seriously.
  3. Offline


    Hey Top_Cat could you use this:

    <HumanNPC>.getSpoutPlayer().setSkin(string url) ???
  4. Offline


    Great work I love it!
  5. Offline



    could anybody give me an example how to spawn a HumanNPC using NPCLib? I am using the newest Version of NPCLib, but I do not know how to do that. Please help me!!!!!

    LG Luloak2

    PS: I do not want to use Spout!
  6. Offline


    I have one question, I made some edits in the npc lib, on my own server it works but on another server it gives an error for every method I edited:

    NoSuchMethodeError: com.topcat.NPCManager.(edited method)

    now could you tell me why that is ? it seems like I can't change it, does it search in github or something like that? :p

    public NPCManager m = new NPCManager(plugin);

    public void create(){
    m.spawnHumanNPC("name of npc", location);

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


    Duckdoom5 Yeeeaaahhhhh, you made my day :) Thank you soo much :)
  8. Is there a Maven repo so that I can include it?
  9. Offline


    Hello, i have a little problem,
    How do you do to import your lib?
    Because i have downloaded the sources on github but when i import it in eclipse, i have many errors, do you have any ideas?

    Thank you for your help
  10. Offline


    okami35 and all others who do not understand how to import

    1. Get the "com" folder out of the others, only the "com" folder is needed.
    2. Open Eclipse and drag the "com" folder into your "scr" folder.
    3. If you do not want to use Spout, comment the Spout import and the Spout-part in the
    4. It should work now :)
  11. Offline


    Thank you for your help, i have tried but it does not work, i have some errors

    maybe i must add a special external jar? (actually i juste have craftbukkit.jar)
  12. Offline


    No you must not add an external jar, hm, I do not understand why you have some errors... I cannot help you, sorry :(
  13. Offline


    For example i have an error on the type "Entity"...

    Thank you
  14. You must have Bukkit and CraftBukkit
  15. Is there also a possibility to require it with Maven? So it updates automatically and I can include it with Maven Shade?
  16. Offline


    I have a problem with my code, please help! I am using the original code from Redecouverte for the EntityTargetEvent with CLOSEST_PLAYER, I added only a system.out.println(), but if I go close to my NPC, the message is coming once and if I come close again there is no message! It only comes once, never twice :( How could I fix that?
  17. Offline


    Currently it seems there is an error with your reference to in the NPCManager, your createExplosion events in BWorld, and a(Packet packet) and a(Packet101CloseWindow packet101closewindow) in NPCNetHandler. Just thought I would point it out even though you probably know about it.
  18. Offline


    Yes, you are right, could anybody fix that please? Maybe Top_Cat ?
  19. Offline


    He never does until an RB comes out for some reason..
  20. Offline


    Wait... How do I download this? It isn't @ Github D:
  21. Offline


    Nah I'll update before RB just not pre-releases (which this isn't), I just have other things I've been busy with, should get this done soon.

    You download the source, it's a lib not a plugin
  22. Offline


    Haha, Im not an idiot :p I can't find it!
  23. Offline


  24. Offline


    How do I... download this? ( it has no download link) also, I'm new to plugins... so..
  25. Offline


    Click the link in the POST ABOVE YOURS then click downloads

    Also this is NOT a plugin
  26. Offline


    How to verify if a Entity (from e.getEntity() in a Listener) is a HumanNPC?

  27. Offline


  28. Offline


    Oh sorry, I writed wrong my question.

    I need to cast a entity or NPC, to HumanNPC.

    My code:
        Player player = e.getPlayer();
        Entity ent = e.getRightClicked();
        NPCManager manager = new NPCManager(ShuraCore.plugin);
        if (manager.isNPC(ent)) {
          if (ShuraCore.plugin.lpCheck(player, "ShuraNPC.manager")) {
            if (player.isSneaking()) {
              NPC npc = manager.getNPC(manager.getNPCIdFromEntity(ent));
              Vars.NPCs.put(player, npc);
    I need to cast the 'npc' to a HumanNPC. Is there a way to do it?

  29. Offline


    ((HumanNPC) npc)
    BloodShura likes this.
  30. Offline


Thread Status:
Not open for further replies.

Share This Page