WorldGuard

WorldGuard

8M Downloads

[EXPLOIT] Minecarts completely bypass entry/exit flags.

LadyCailinBot opened this issue ยท 1 comments

commented

WORLDGUARD-3936 - Reported by tomtehtom

To premise this report I will say that I have not looked at EVERYTHING but am fairly confident it is not an issue in my personal instance with settings etc and rather an issue with worldguard at its core. Apologies if this is not the case.

To put it in short, Minecarts can bypass entry/exit flags. They need the same behavior as boats to kick the player off when there is an attempt to exit/enter.

Explanation:
Although the message "You cannot enter/exit" displays, the minecart+player carry on. Minecarts need to be given the same response as boats where it kicks the player off. This however does not happen.

I've tested this on a blank test server with just spigot (latest) worldguard and worldedit both the latest stable release.

Created a region with entry: deny minecart+player can just ride right in, you get the "You cannot enter" message but can carry on. However if the player gets off it will teleport them back to the edge of the region.

Bit more of a problem for exit: deny as you can exit the region using the minecart and get the "You cannot exit" message and then get out and it does not teleport you back, therefore bypassing the exit flag completely.

This is most notably an issue with vehicle plugins which use minecarts for the main seat/mechanic. People can just bypass all exit/entry flags while in their vehicles as they do not get kicked off.

I personally need a fix for this as I am forced to disable many features due to the exploit.

Thanks in advance.

commented

Comment by PseudoKnight

Cannot reproduce here, though I could see how it would be an issue for vehicle plugins. But since you tested on latest with no other plugins, I'm unsure. This probably needs more information to trace.

Relevant code:

https://github.com/sk89q/WorldGuard/blob/master/worldguard-legacy/src/main/java/com/sk89q/worldguard/bukkit/listener/WorldGuardVehicleListener.java#L56

Note that the player passenger must be directly in the minecart that's moving. I know some custom vehicles use stacks.