Check plugin update automatically when enabling it.
- Create a TXT file in your Github repository, and write down your plugin's latest version number in it.
- Use the method in
onEnable()or anywhere you want, and remember to change%Github-user-name%into your username and%Github-repo%into your repo name:
PluginUpdater.check(this, "%Github-user-name%", "%Github-repo%");- Change the version number in the TXT file when you update your plugin version. Remember to update the version of your plugin every time you publish it.