Are you sure you want to report this?

We've split up the commands, scripting and mods, and add ons category! Please be sure you get your thread in the right place.


Edit Player NBT


Post a new comment:

Please sign in to leave a comment.

  • Avatar

    To clear up any confusion, when I say "it might have been rejected before" I mean that maybe the Mojang team had thought of it and rejected it, I did make sure to check for identical posts and rejected ideas similar to this before posting and found nothing.

  • Avatar
    Pe brito commented

    I'd like to see this feature in the game too, but there's a reason why it'll very likely never become reality.
    If you change the player's health through survival elements, such as instant damage, the game will be notified of that, and update health bars, scoreboard objectives, etc.
    If you change it through NBT, there's no way of telling the game when it happens, unless it updates everything whenever you change a tiny bit of data. This could lead to performance issues, or desynchronization between the client (the players' devices) and the server.
    That's only my explanation, though. It might be inaccurate, but why wouldn't they add that feature then?

  • Avatar
    Demonfox50 commented

    I mean a players nbt is actually handled by client so it wouldn't link correctly to server but if the player data was handled by the server than it would probably fix a lot of minecraft's client to server de-sync issues but what issues this would create is unclear.

  • Avatar
    deathconekul commented

    I agree that the reason why you cannot do it already is likely due to desynchronization between client and server.

    Maybe allow nbt editing of just the inventory at the very least, as that would open up a lot more possibilities for maps/datapacks, such as changing the lore of an item in the player's inventory while keeping the stack size, and not having to cycle through all 64 of the possible stack sizes to use /replaceitem

  • Avatar
    poolcool02 commented

    The desynchronization problem could simply be fixed by them making it sync when such a command is ran, sure when used too much it would cause lag but I do not see that as much of a problem, overuse any command and it will cause lag, also server plugins edit NBT data all the time, however they are doing it they have it work just fine, Mojang could do the same thing.

  • Avatar

    Dinnerbone said "The whole idea behind editing NBT isn't that you're editing the entity, or the item, or the block - you're saving it, editing the save data, and loading it again. NBT isn't what we are using in memory, we have more efficient in-memory structures for things. It's 100% just save data." and modifying player data would have to kick the player out then reconnect them. 

  • Avatar
    poolcool02 commented

    My point is that server plugins can do it, so Mojang could find a way to do it too

  • Avatar

    Wow, a suggestion in this category that isn't bad (seriously kids stop asking for /fly and other fraction server crap!),

    this would be great for custom games (pvp, pve, adventure, etc.)! this deserves more votes.
    and maybe just things like heath, damage, speed, maybe even custom values!

  • Avatar
    Shadow Blitz commented

    the issue with destroying the player and disconnecting could be solved by creating a copy of that player and then setting the net id to it and THEN destroy the old player in the same frame.

    and then you have edited player nbt data.