Hello Bukkit Dev Community! I'm quite new to Bukkit development, but I am fairly familiar with Java. I've watched a couple basic bukkit tutorials and I've seen the standard "public boolean onCommand(CommandSender, Command cmd, String label, String[] args)" line for creating an in-game command. My question is... why is the return type a boolean instead of void? Sorry for the ignorance and thanks in advance!
The boolean type is used so that if it returns false, it will show the player the 'usage:' message for that command in the plugin.yml For example, if you had this: Code: testcommand: usage: Not valid! Try this: /<command> arg1 Then it would say to the player 'Not valid! Try this: /<command> arg1' when it returns false. Hope this helped!
@ShewShew Don't watch tutorials. The videos are all worthless and won't teach you how to make good plugins. There is the official Bukkit tutorial available on the web, that should help you get started.
@ShewShew The best knowledge you will be able to get is from the JavaDocs. Though they are a bit deprecated, to say the least, they should still help you out with any questions on what each method does and what each field contains. http://jd.bukkit.org
@FabeGabeMC Why not post the spigot docs? Anyone still making plugins will most likely use spigot anyway. https://hub.spigotmc.org/javadocs/bukkit/
@FabeGabeMC It is though since Spigot are updating Bukkit. They just still don't support Bungee, offline, modded the usual