WorldGuard icon indicating copy to clipboard operation
WorldGuard copied to clipboard

Custom enchantments can bypass regions?

Open MinecraftNight4 opened this issue 1 year ago • 3 comments

WorldEdit Version

7.3.6+6892-3d660b8

WorldGuard Version

7.0.10+d9424b1

Platform Version

Purpur 1.21.1-2302-0a9941e

Confirmations

  • [X] I am using the most recent Minecraft release.
  • [X] I am using a version of WorldEdit compatible with my Minecraft version.
  • [X] I am using a version of WorldGuard compatible with my Minecraft version.
  • [X] I am using the latest or recommended version of my platform software.
  • [X] I am NOT using a hybrid server, e.g. a server that combines Bukkit and Forge. Examples include Arclight, Mohist, and Cardboard.
  • [X] I am NOT using a fork of WorldEdit, such as FastAsyncWorldEdit (FAWE) or AsyncWorldEdit (AWE)

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:

  • In my project, Music Discs take the place of vanilla items.
  • I tried to test if this enchantment affects any hoe, and I can confirm that this issue persists.
  • Sorry for the lag, i was self hosting this server on my notebook.

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

MinecraftNight4 avatar Sep 07 '24 21:09 MinecraftNight4

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

wizjany avatar Sep 07 '24 21:09 wizjany

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

MinecraftNight4 avatar Sep 07 '24 21:09 MinecraftNight4

that doesn't change anything

wizjany avatar Sep 07 '24 21:09 wizjany