ColinHDev / CPlot

Land and world management plugin for PocketMine-MP
https://discord.gg/cAYKEtaqnp
GNU General Public License v3.0
29 stars 12 forks source link

Remove command lock #22

Closed ColinHDev closed 2 years ago

ColinHDev commented 2 years ago

I do not really like the approach I went for in the recent commits... I think I pause this until I (or anyone else) came up with a better code design

ColinHDev commented 2 years ago

The problem with this approach is the current design of our command classes. Having locks identified by objects is a problem if an exception is thrown somewhere during the execute() run. If this happened, we are "stuck" in the subcommand's onError() method without the lock object to unlock the plot

ColinHDev commented 2 years ago

This finally needs to be addressed

ColinHDev commented 2 years ago

And done.