EverNife / FinalForgeRestrictor

Enhanced protection for Cauldron modded servers
5 stars 5 forks source link

"PlotSquaredHandler.canUseAoe" should be improved! #1

Closed ailanlana closed 6 months ago

ailanlana commented 6 months ago

It's true that the area around a plot can't be destroyed by other players.However, the owner of the plot itself can use the aoe to destroy the plot road

ailanlana commented 6 months ago

Detection of aoe item should also require BlockBreakEvent, as currently there is only PlayerInteractEvent where the player can stand outside of the detection range and destroy squares within the detection range in order to destroy the territory.

EverNife commented 6 months ago

I think the best approach to fix AOE is to check if the player is fully inside his claim, so, if any of the corners is not inside HIS plot cancel the event.

ailanlana commented 6 months ago

I think you've made a good suggestion.The second one I forgot to mention is in the context of GriefPreventionPlus, my server has PlotSquared on one zone and GriefPreventionPlus on the other, and I've solved the problem perfectly by judging the block destroying events!

EverNife commented 6 months ago

not all AOE blocks fire block breat events.

Have you forked the project? maybe you can show me what you did for me to take a look

EverNife commented 6 months ago

Tried to implement the idea at https://github.com/EverNife/FinalForgeRestrictor/releases/tag/2.0.3

ailanlana commented 6 months ago

It's running well now, thank you! I'll keep you posted if I have any questions.