Create entity that my plugin can handle

Discussion in 'Plugin Development' started by ZanderMan9, Jul 9, 2014.

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


    Hey, I'm working on a sort of "Pets" plugin. I've hit a bit of a roadblock with it, though. I know that you can spawn a wolf at a location using getWorld().spawnCreature(location, EntityType); but I need to... how to say this, create an entity without spawning it. A theoretical entity that my plugin can handle, and actually spawn once it's been worked with. I've googled around but to no avail. Can anyone enlighten me?
  2. Offline


    That method returns a LivingEntity which you should be able to work with right after spawning it. Do you have something specific you must do specifically before spawning the wolf?
  3. I don't think that is possible, but what you can do (the closest I know of) is making the entity invisible and make it not able to move (add Speed Potion to negative 1).
    Making entities invisible:
    If invisible potions work on entities, use that instead.
  4. Offline


    Thanks. I'll look around on the JavaDocs and such for the stuff you've told me :)

    I need to attach the wolf to the player that will be the owner. Should I spawn a dog w/ metadata... is it possible to do that to set the owner?

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


    ZanderMan9 why don't you use getWorld().spawnEntity() instead? :confused:
  6. Offline


    Because, I don't think that allows me to do anything except spawn it right? No special nametags or anything like that..?
  7. Offline


    ZanderMan9 The best way to achieve this would be using an NPC lib. Find one that has the things you need and then control the entities via the NPC lib.
  8. Offline


    Whew... You mean krumpleblase2's libs? Such a massive library, I have no idea where to begin.
  9. Offline


    Yes, or Citizens.
Thread Status:
Not open for further replies.

Share This Page