NpcSpawner lib - spawn basic NPCs

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

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

    NeoSilky

    I knew that, I was just checking because people earlier on were saying you should? Sorry, nice LIB anyway :)

    Also, please add the ability for NPC's to place and destroy blocks if it's not already there?! :D Thanks!

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

    Top_Cat

    I'm not quite sure what you mean, but whatever it is shouldn't be in the lib or can't be done.
     
  3. Offline

    NeoSilky

    Get an NPC to place a block that you define? :)
     
  4. Offline

    olloth

    You can do that yourself without the lib?
     
  5. Offline

    NeoSilky

    Could you make it walk near it then make it place a block?
     
  6. Offline

    dadaemon

    Code:
    npc.moveTo(X, Y, Z, Yaw, Pitch);
    Then do the place block stuff...
     
  7. Offline

    Lolmewn Retired Staff

    I just found a bug:
    When I call my NPC Lolmewn (my IGN is also Lolmewn), it seems all messages go to the NPC instead of me.
    Please fix :O
     
  8. Offline

    Top_Cat

    All "messages" ?
     
  9. Offline

    dvdbrander

    I get The method a(IUpdatePlayerListBox) in the type MinecraftServer is not applicable for the arguments () in

    void org.martin.bukkit.npclib.BServer.stop()
     
  10. Offline

    Top_Cat

    I've updated the lib :)
     
  11. Offline

    NeoSilky

    what have you added? :D
     
  12. Offline

    Top_Cat

    I fixed the error in the post above mine. I maintain the lib, I'm not really adding any features atm
     
  13. Offline

    NeoSilky

    Ahh, i see :) Is there any you could add? I can't think of any? :(
     
  14. Offline

    Trc202

    Attempting to spawn npcs and I recieve a
    Code:
    java.lang.NoSuchMethodError: net.minecraft.server.ItemInWorldManager.<init>(Lnet/minecraft/server/WorldServer;)V
       at org.martin.bukkit.npclib.NPCManager.spawnNPC(NPCManager.java:102)
    Any ideas?

    Never Mind, i'm an idiot.

     
  15. Offline

    fullwall

    @Top_Cat - @Lolmewn's issue is that NPCs with duplicate names (either with other npcs or other players) will override their duplicates. Dinnerbone's fix to prevent duplicate players on login is the cause. CraftPlayer.players (static) needs to be cleared of the NPC's name when getBukkitEntity() is called and bukkitEntity is null.
     
  16. Offline

    Lolmewn Retired Staff

    Ye, messages that are ment for me. (For example, the warp plugin should say "Warped to XX" but it sends it to the NPC)

    Oh, and it needs update for 1.9 pre-5 :p
    Just do iiiit =D

    Is there any way I can do that myself? I don't really know where it all is, so..
    Thanks for the help btw.

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

    fullwall

    @Lolmewn - it requires editing of the core NPC files, specifically those that extend net.minecraft.server.Entity. It also needs a bit of reflection to access the player map field.
     
  18. Offline

    Lolmewn Retired Staff

    Nah, I'll let @Top_Cat take care of it :p
     
  19. Offline

    orange451

    @Top_Cat
    I can't seem to disable the plugin correctly (when using reload).
    It gives an error saying it didn't close correctly, what could I be doing wrong?
     
  20. Offline

    orange451

    @Top_Cat
    Also, when the npc's die, sometimes it locks up the server, and everyone is disconnected (infinate loop?).
     
  21. Offline

    okami35

    Hello,
    Your lib looks very usefull but when I import it in eclipse in my project (in the package redecouverte.npcspawner), i have many errors in your classes files. I imported Bukkit and craftbukkit.
    Do you know where is the problem?
     
  22. Offline

    Lolmewn Retired Staff

    when an entity get's hit, check if it's an NPC and if so, do event.setCancelled(true);

    Hey @Top_Cat , any progress on 1.9 pre-5 NPC's? Would be super awesome!

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

    Top_Cat

    This isn't a plugin, it is an api for others...

    I don't/won't update for pre releases, if kekec does then good for you :)

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

    Lolmewn Retired Staff

    Who's kekec?

    And oh, only getting one error @ 1.9 pre.
    So wouldn't be to hard I think + I would have something to do again :p
     
  25. Offline

    orange451

    I know it is not a plugin, I wrote a plugin using this api.
     
  26. Offline

    Top_Cat

    Then a link to your source would be good ;)

    Kekec is the other person who has an up to date repo

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

    orange451

  28. Offline

    Lolmewn Retired Staff

    Hey Kekec , could you update for 1.9 then? Since Top_Cat doesn't want to :'(
     
  29. Offline

    orange451

    @Top_Cat
    I figured out that the error is not when they die, it's when they're created (only sometimes does it crash though).
    I don't have a copy of the server error, but it said that it was a server error (not a plugin error). Something about a null pointer exception when trying to get an entity from the world after a player joined the game.
     
  30. Offline

    Top_Cat

    I will update for 1.9, that isn't released yet ;)
     
Thread Status:
Not open for further replies.

Share This Page