Paper
Paper copied to clipboard
Tag Modification API
You can create TagUpdates on the Registry instance, which you can then send to a single player or apply to the whole server to affect all players.
// createTagUpdate will throw UOE on all non-CraftRegistry impls
TagUpdate<?> update = Registry.STRUCTURE.createTagUpdate(map -> {
// map is a mutable Map<Key, Set<Structure>>
map.put(Key.key("eye_of_ender_located"), Collections.emptySet()); // will prevent eye of enders from finding strongholds
});
Bukkit.getServer().applyTagUpdate(update);
- [ ] https://github.com/PaperMC/Paper/pull/8920
Added a method to edit a single registry's tags directly. Also added improved javadocs listing the 2 registries this works with and that its best to group changes to multiple registries.