This should improve the performance of the plugin even more, because it
won't do any database calls while inside the loop which is what was
usually the hang up time.
This is completely untested and possibly could throw tons of errors.
We now get the cache object inside the move event and get all the other
objects from that. The reason for this is so that we don't have to then
loop through all the prisoners in a jail again to get one prisoner, just
get it from the cache object.
The cache listens to a lot of events and custom events to ensure the
cache is up to date, this way we don't have to loop through all the
prisoners in a jail every single time they move or something but instead
just check the cache.
I want to get fully away from blocking methods and instead make the
user/player/prisoner/whatever wait to get an answer while we retrieve
the uuid information asynchronously.
While doing this I deleted one method that I shouldn't have, so going to
revert that. Next I have to build a method or two which will allow me to
do last known names lookups, etc. Might switch to using a library to
handle getting names async so we don't block the server up, doing this
will result in us having to recode some of the commands internally.
If you have any suggestions or questions, I'm open.
Unless the player has admin permission. This does not include the
penalties as those will be done in a future commit. This also has a
little better performance on the block placing and breaking events, if
these checks are disabled.