This simplfies the code and improves performance by only needing to loop
over the menu entries instead of the inventory and checking all types of
inventories.
- Fix exceptions being thrown when losing focus on the client when
searching. There is still an exception when spam clicking, but that was
always there to begin with.
- Fix searching while using the GE window and while using a shop window.
Instead of using the global SingleThreadedExecutor for some requests,
use enqueue method of okhttp.
This should hopefully help with some plugins, and more specifically the
ui from freezing while the online api is down.
If a plugin used a combination of renderPolygon and either use other
util methods or draw on their own on the same graphics object, the
stroke would get applied as well.
The MouseEvent constructor says in its documentation to pass the extended modifiers. This contains alt, ctrl, meta, etc. Doing this also requires passing down the button pressed in the constructor.
Fixes#1618