Hey I just released a new plugin which I thought would get a few downloads. It only has 1 download at the moment. Does anyone have some feedback for me? You can look at the code on the GitHub page linked on the resource page. http://www.spigotmc.org/resources/maintenanceplus.7498/
Ok. Didn't need two of the same link. Anyway, so I guess package names should be changed a bit. I think everything else is right. What about features of the plugin?
You do not get downloads because you made a plugin for something that already exist. Is not hard to set whitelist to true, set another icon and motd. Try to make something that you can't do without plugin, then you will get downloads.
Not a fan of singleton methods, also in the SettingsManager why is there a Plugin p that is never initialized? You are circling around just using plugin#getConfig(), by which you are instead putting it into the SettingsManager and requiring its use. saveConfig() and reloadConfig() are already methods in Bukkit... https://hub.spigotmc.org/javadocs/spigot/org/bukkit/plugin/Plugin.html Or am I wrong in something there?
... Yeah, I would honestly suggest against using others code and for experience sake code your own settings manager. In the onEnable you ignore your own settingsmanager and use bukkit methods, which is correct but shows that there is no real point in having superfluous methods in your code: Also that saveConfig() position bugs me more than it should; but that's just me I guess
Yeah I prefer to use default config methods from bukkit. But data saving is easier with the SettingsManager. Also, that saveConfig(); positioning is weird. On my IDE it is in a normal position.
@Puddanator Don't use Bukkit.getLogger(), use JavaPlugin#getLogger(). You should use the appropiate access modifiers for your fields - the majority of them (in most projects) should be private. Cache your fields! No need to read it from the config each time. Like mentioned before, static abuse. You can simply pass the plugin instance ('this' in your main class) through the constructor of another class. (the singleton design pattern should not be used if better alternatives are available)
OMG. I know. I will be going through here and getting all the code feedback and fixing it soon but I want to add some new stuff as well. Does anyone have some suggestions on the current features or new features I should add.