[BUG] `ON_USE` bypassing grave protection
ginsm opened this issue ยท 1 comments
Describe the bug
You can right click to retrieve anyone's grave currently, even without being an operator and grave robbing turned off.
Minecraft Version
1.17.1
Forgotten Graves Version
v1.1.0-dev
To Reproduce
- Right click another player's grave.
- ???
- Profit
Expected behavior
Right clicking another player's grave should result in nothing happening.
Additional context
I'm guessing it has to do with Grave Robbing, as even when you are not operator you can still do it. However, I'll look into both enforcing operator level and Grave Robbing with ON_USE.
Commit 890e901 resolves this issue:
Seems like there was an issue with logic there:
- It should always check whether the player owns the grave or not before running any other conditionals.
- The conditional checking whether they have sufficient operator privileges would always fail (which would equate to true)... thus allowing anyone to retrieve the grave.
These issues have been fixed.
Closing this issue.