-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Create Stopwatch and Timer plugin #7223
base: master
Are you sure you want to change the base?
Conversation
New plugin |
This violates Jagex's rules about plugins assisting with PvM. |
This plugin certainly does not violate any Jagex rules. It works as a standalone feature in the plugin panel and does not pull data from the core client. The set-timer plugin #3188 offers similar functionality, albeit limited to the inferno. |
The default timers plugin already has these features? |
This plugin is designed with speedrunners and PvMers in mind, offering larger UI elements for clearer visibility during high-paced gameplay. Moreover, the larger UI and integration into the plugin panel is very helpful for streamers and content creators. It also includes predefined presets for specific PvM encounters without requiring manual adjustments. While the default timers plugin may serve general needs, this plugin is tailored for those who require quick and efficient time control. A similar argument for the need of separate plugins can be made for set-timers (#3188). |
I didn't see it was manually activated timers. Disregard my comment |
Don't construct your panel on the client thread, construct it on the Swing thread (just move the new StopWatchPanel outside of the invokeLater): https://github.com/pr0f3ss/StopWatch/blob/cc38d5c8ee2f5139c138fb6c6c620a39779ad701/src/main/java/com/stopwatch/StopWatchPlugin.java#L41 Same goes for ClientToolbar#removeNavigation, that should be on Swing thread as well https://github.com/pr0f3ss/StopWatch/blob/cc38d5c8ee2f5139c138fb6c6c620a39779ad701/src/main/java/com/stopwatch/StopWatchPlugin.java#L60 You need to make sure this clip is closed to avoid leaking resources (check something like c-engineer plugin for an example? I'm not sure exactly where to look): https://github.com/pr0f3ss/StopWatch/blob/cc38d5c8ee2f5139c138fb6c6c620a39779ad701/src/main/java/com/stopwatch/StopWatchPanel.java#L356-L358 |
Thanks for the review. I've adjusted all of your raised concerns. For the clip player, I looked into the c-engineer plugin to see how they do it. Essentially, I created a sound player class that holds a single clip instance, which is created/destroyed appropriately. |
Can you describe where you got the alert.wav sound file and whether it is appropriately licensable? |
This plugin adds a simple stopwatch and countdown timer to the plugin panel, ideal for speedrunning, skilling, and PvM encounters. The countdown timer finds use in specific PvM mechanics, such as ghost skipping at Cerberus or set spawning in the Inferno. It comes with multiple presets and optional sound notifications.