EngineHub / WorldGuard

🛡️ Protect your Minecraft server and lets players claim areas
https://enginehub.org/worldguard/
Other
833 stars 546 forks source link

Custom enchantments can bypass regions? #2140

Open MinecraftNight4 opened 2 months ago

MinecraftNight4 commented 2 months ago

WorldEdit Version

7.3.6+6892-3d660b8

WorldGuard Version

7.0.10+d9424b1

Platform Version

Purpur 1.21.1-2302-0a9941e

Confirmations

Bug Description

With 1.20.5, datapacks now can have custom enchantments, but seems like World Edit doesn't register some actions from this feature.

Currently I'm using 1.21.1 and I was preparing some stuff to launch a server with some friends. I was testing stuff on my server and I noticed that in a protected area without perms was able to REPLACE some blocks due to an enchantment.

Expected Behavior

I thought that because hitting a block is an action coming from a player, the enchantment would be blocked, but it seems that this is NOT the case.

Reproduction Steps

  1. Install this datapack and restart the server: test_datapack.zip
  2. Hold ANY hoe in your hand
  3. Enchant the hoe with this command: /enchat @s tester:grass_replacer
  4. Create a region where you don't have perms on it
  5. Hit any grass block in that region, using the hoe with LEFT CLICK.

Extra notes:

https://github.com/user-attachments/assets/23edaece-2fea-498c-be6c-a38a0820c978

https://github.com/user-attachments/assets/1e043fce-df1d-4a67-9ca1-bc7c0d4f4e54

Optional WorldGuard-Report

https://paste.enginehub.org/4hPogKzuk.report

Anything Else?

No response

wizjany commented 2 months ago

this is up to the platform. if we don't get an event saying the player changed a block, we can't prevent it.

MinecraftNight4 commented 2 months ago

I'm really sorry, i forgot to upload the server log: https://api.mclo.gs/1/raw/lNG8JC3

wizjany commented 2 months ago

that doesn't change anything