WorldEdit for Bukkit

WorldEdit for Bukkit

21M Downloads

Add a feature to remove NBT tags from block entities

Podgorica opened this issue ยท 0 comments

commented

The Problem

As an admin on a server, we often receive requests from players to move their builds from the creative world to the survival world. However, we have strict rules that prohibit the transfer of anything unobtainable in survival mode. Unfortunately, enforcing these rules is a challenge because of the numerous block entities and NBT tags that exist in Minecraft.

In the past, checking the contents of chests and other containers was sufficient to ensure that they complied with server rules. However, with the introduction of numerous NBT tags, many items and structures can now contain potentially harmful data. For example, signs can execute server commands, and breaking a bee hive can cause it to explode into hundreds of invulnerable bees.

A Solution

I propose implementing a feature that allows for the easy removal of all NBT tags from block entities. This could be achieved by adding a flag to the existing //paste command or creating a new command called //stripnbt which would remove which would remove the NBT data from the block entities within a selection. With this feature, admins could ensure that all builds being transferred meet the requirements for survival mode.

I believe that both of these suggestions are valuable and serve unique use cases. If necessary, I am willing to split my original suggestion into two separate feature requests to ensure that each idea is properly considered.

Alternatives

We are currently using a method that involves replacing each block entity with itself while preserving the block state, e.g. //replace chest ^chest. This technique has the intended side effect of clearing the NBT data. However, it is not an ideal solution because it is time-consuming to run each of the 50+ commands individually.

Another option is to have a user without the worldedit.setnbt permission perform the //copy and //paste commands. Unfortunately, this approach also has drawbacks, as it requires de-opping and adjusting permissions for admins, which can be time-consuming and inconvenient.

Given these challenges, we believe that it would be beneficial to have a built-in solution for removing NBT tags from block entities. This would save time and streamline the process of transferring builds between worlds.

Anything Else?

No response