SergiFerry / PlayerNPC

PlayerNPC API for Spigot 1.17+
https://www.spigotmc.org/resources/playernpc.93625/
26 stars 6 forks source link

Getting Entity Instance #26

Open cinquina opened 1 year ago

cinquina commented 1 year ago

Is there anyway to get the entity's instance? (ex. npc.getBase())

SergiFerry commented 1 year ago

If you cast as NPC.Personal you can get personal.getEntity()

On Fri, 17 Feb 2023 at 10:58, cinquina @.***> wrote:

Is there anyway to get the entity's instance? (ex. npc.getBase())

— Reply to this email directly, view it on GitHub https://github.com/SergiFerry/PlayerNPC/issues/26, or unsubscribe https://github.com/notifications/unsubscribe-auth/AVGYYCVFQZCWRDHY6ENGDVTWX5DUNANCNFSM6AAAAAAU7HHUVY . You are receiving this because you are subscribed to this thread.Message ID: @.***>

cinquina commented 1 year ago

Thank you so much for the fast response. Whats the difference between Global and Personal? Global is generated for every player and Personal is just local?

SergiFerry commented 1 year ago

The difference between Personal and Global is that Personal is the manager of an Entity, and Global is the manager of a bunch of Personal NPC of each player. So with Personal ya can only show it to one player and with Global to everyone.

On Fri, 17 Feb 2023 at 19:16, cinquina @.***> wrote:

Thank you so much for the fast response. Whats the difference between Global and Personal? Global is generated for every player and Personal is just local?

— Reply to this email directly, view it on GitHub https://github.com/SergiFerry/PlayerNPC/issues/26#issuecomment-1435060203, or unsubscribe https://github.com/notifications/unsubscribe-auth/AVGYYCR3RWXQMKYFFPC6MCDWX656LANCNFSM6AAAAAAU7HHUVY . You are receiving this because you commented.Message ID: @.***>

cinquina commented 1 year ago

Thank you so much!