#Can someone explain to me how to add a variable to the Player.

5 messages · Page 1 of 1 (latest)

thorny pine
#

I would like to add a simple Double variable to be tracked for every player individually.
My understanding is that it needs to somehow be added to the PlayerData saved in PlayerManager.
Can someone please point me in the right direction to do this?

simple plover
#

The easiest is probably using the data attachment API. I'm not sure if you attach it to the player entity or the game profile though.

#

I've got an example for a sheep, which is kinda close. One sec.

#

Found a better example