Fixed an error where the /toggledoor command would state the inverse state of the toggled door.
This happened because for the output the value of the isLocked variable was inverted after the variable was changed to toggle the lock.
Additionally, I added a check so only doors in a radius of 5 meters can be toggled. After some testing, this seems like an overly excessive distance, but I left it at 5. This distance should be set by the server admin to their liking.
Fixed an error where the
/toggledoor
command would state the inverse state of the toggled door. This happened because for the output the value of theisLocked
variable was inverted after the variable was changed to toggle the lock.Additionally, I added a check so only doors in a radius of 5 meters can be toggled. After some testing, this seems like an overly excessive distance, but I left it at 5. This distance should be set by the server admin to their liking.