retrooper / packetevents

Precision meets performance—a powerful tool for mastering Minecraft packet manipulation with speed and finesse.
GNU General Public License v3.0
539 stars 152 forks source link

World for NPC #125

Closed Technosword closed 3 years ago

Technosword commented 3 years ago

Is there a way to get/set the world the NPC is spawning in or specify that? If not, I'd like you to add that method?

retrooper commented 3 years ago

Instead of letting you spawn an NPC in a world and dealing with it as if it were a normal player, we let you spawn an NPC for a player. Spawning it for a specific player will spawn it in their own world. If you want all players in a world to view it, you need to spawn it for all of them. We are sending packets to all of those clients. Have I misunderstood your question?

Technosword commented 3 years ago

Ah I understand, perhaps it would be better if you could get the world an NPC is spawned in so you can save it to a database and create a new Bukkit location with it later.

retrooper commented 3 years ago

I think that solution wouldn’t be too efficient, lets say a developer only wanted to spawn an NPC for an individual user. I don’t think an advanced NPC API is appropriate to be built into packetevents.

retrooper commented 3 years ago

Sorry for delayed response, I responded long ago, but the message didn’t send and I had no motivation to retype it.. 😆

Technosword commented 3 years ago

Makes sense, thank you!