Skip to main content
Discovery icon for PaperMC Discord server

PaperMC

13,812 Online
55,239 Members
paper-dev4 people

adding team tag to EntitySnapshot

Bukkit's Team#addEntity does not serialize a Team NBT tag into EntitySnapshot, requiring manual Adventure NBT editing instead.

  • Calling Team#addEntity registers an entity into global scoreboard memory rather than saving a Team tag directly onto the entity data
  • Persisting entity UUIDs on scoreboard teams across unloads risks leaking memory if orphaned entries are not explicitly cleared
  • Vanilla uses the Team entity tag as spawn utility data for spawn eggs and datapacks to assign teams on read
  • Adventure NBT's TagStringIO can deserialize snapshot strings, inject the Team tag string, and rebuild an EntitySnapshot via EntityFactory
Summarized from recent messages, might be inaccurate

More conversations

paper-dev

modifying spawn egg entity data

Talk, Play, &
Hang Out

Find your space to hang out, discuss the latest updates with the party chat, and see who's down to join your next match.
Get App