You might want to add a @Range annotation to the two dither config fields to prevent users from setting the value to 0.
The plugin stops working completely when this happens, even after turning it off and on. You may also want to clear the Drops array in shutdown() in case something like this happens.
2021-09-04 15:25:22 [Client] WARN n.r.c.ui.overlay.OverlayRenderer - Error during overlay rendering
java.lang.IllegalArgumentException: bound must be positive
at java.base/java.util.Random.nextInt(Unknown Source)
at com.rlweather.Drop.update(Drop.java:42)
at com.rlweather.RlweatherOverlay.renderDrops(RlweatherOverlay.java:163)
at com.rlweather.RlweatherOverlay.render(RlweatherOverlay.java:67)
at net.runelite.client.ui.overlay.OverlayRenderer.safeRender(OverlayRenderer.java:747)
...
You might want to add a
@Range
annotation to the two dither config fields to prevent users from setting the value to 0.The plugin stops working completely when this happens, even after turning it off and on. You may also want to clear the Drops array in
shutdown()
in case something like this happens.