Resource icon

Script NBT Player Data 2025-02-26

  • Welcome to skUnity!

    Welcome to skUnity! This is a forum where members of the Skript community can communicate and interact. Skript Resource Creators can post their Resources for all to see and use.

    If you haven't done so already, feel free to join our official Discord server to expand your level of interaction with the comminuty!

    Now, what are you waiting for? Join the community now!

Supported Skript Version
  1. 2.10
Supported Minecraft Versions
  1. 1.19
  2. 1.20
  3. 1.21
Requires SkBee 3.8.2+, Skript 2.10+.

NBT Player Data​

Basic NBT-based player data system.
Stores strings and numbers in NBT, but accessible via variables.


Example:{-npd::%player%::strength} = 1
This value is stored in npd_data/<player's uuid>.dat as {strength: 1}.
All values under {-npd::%player%::...} are stored in the file.

Use npd_load_player_data() to load data into variables.
The save function saves data to nbt.The unload function saves data and clears the variables.

By default, data is loaded when the player joins, saved every five minutes, and unloaded when they quit.

A default nbt file can be provided that all new users' values will be set to.

NOTE: ONLY STRINGS AND NUMBERS WILL BE STORED. NO COMPLEX TYPES (yet).​

  • Like
Reactions: eult
Author
Sovde
Downloads
90
Views
284
First release
Last update
Rating
5.00 star(s) 1 ratings

More resources from Sovde

Latest reviews

Very cool to see you working with NBT — really well done.
For future releases: could you please upload it as a file instead? GitHub strips colors and the SkUnity parser got proper formatting :wink: