elBukkit / PreciousStones

Self-service protection for Minecraft servers
http://dev.bukkit.org/server-mods/preciousstones/
10 stars 10 forks source link

Minecart Hopper issue #53

Closed xtomyserrax closed 3 years ago

xtomyserrax commented 3 years ago

"Hello, I would like to report a bug that allows robbing players on plots.

With the help of the sword with enchant knockback 2 you can push the minecart with the hopper onto the plot under the chest, the hopper will fill up and you can push it out of the plot and open

I'm sorry for my English, I use google translate"

By @xGlenor in marcelo-mason/PreciousStones#1163

xtomyserrax commented 3 years ago

You can push the minecart with that sword with knockback and also with your body. Im not sure if its possible to fix this issue: https://www.youtube.com/watch?v=tctsDAe_KG4

(not even WorldGuard prevents this)

xGlenor commented 3 years ago

I solved this problem using the PS API and the code below

https://pastebin.com/YcqnBpWX

xtomyserrax commented 3 years ago

Thank you for sharing that, Ill implement it!

The problem though is that players are still able to push the minecart with their bodies, right?

xGlenor commented 3 years ago

Hmm, adding the VehicleEntityMoveEvent event blocks this pushing, the problem was only when the player pushed the minecart used sword with enchant knockback 2

I'm sorry for my English, I use google translate

xtomyserrax commented 3 years ago

Fixed, thank you for your help! (this doesnt fix though players being able to push the Minecart with their bodies as there isnt any event as far as I know which will let us know if a player moved the vehicle phisically)