-
Notifications
You must be signed in to change notification settings - Fork 22
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
Make protectionTimer publicly accessible #102
Conversation
Changed some stuff to public for API usage
Seems ok, except for the fact that it does not compile. But I should add that everything outside of the |
Should compile now, also made the code simpler in getCountdownMin and getCountdownSec
Compiles now, shouldn't break anything as I just added some public methods to get the protection time |
Main.getLanguageManager().broadcastMessage(ConfigMessages.PROTECTION_TIME_OVER); | ||
Main.getVaroGame().setProtection(null); | ||
scheduler.cancel(); | ||
} else if (protectionTimer % ConfigSetting.STARTPERIOD_PROTECTIONTIME_BROADCAST_INTERVAL.getValueAsInt() == 0 && this.protectionTimer != timer) | ||
Main.getLanguageManager().broadcastMessage(ConfigMessages.PROTECTION_TIME_UPDATE).replace("%minutes%", getCountdownMin(protectionTimer)).replace("%seconds%", getCountdownSec(protectionTimer)); | ||
} else if (ProtectionTime.this.protectionTimer % ConfigSetting.STARTPERIOD_PROTECTIONTIME_BROADCAST_INTERVAL.getValueAsInt() == 0) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What happened to this.protectionTimer != timer
?
My comment might have been a bit misleading. What I actually meant was that you can make breaking changes any time you want. But you also might have to update whatever other plugin uses these methods. We also cannot guarantee that these methods will not be changed in the future. |
Using Integer might be better Co-authored-by: Almighty-Satan <[email protected]>
Co-authored-by: Almighty-Satan <[email protected]>
You removed |
Changed some stuff to public for API usage