You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Do prefer if (!statement) { return; } // rest of code over if (statement) { // rest of code } as it reduces nesting depth by a great deal (EDIT: some classes seem to use it, some don't).
Sometimes there's still section signs, try to stick to ChatColor.
Do avoid asynchronous tasks for small things, and absolutely do avoid them when Bukkit / Minecraft is involved and it's not guaranteed to be thread safe.
Do prefer Runnables over BukkitRunnable if you're not using the cancel() method. (this means you should probably use it in all cases of runTask and runTaskLater).
Liskov Substitution Principle! Program against abstractions rather than implementations (i.e. use List rather than ArrayList, Set rather than HashSet, Map rather than HashMap, etc, when choosing a type for a variable, parameter or field).
Sets are faster than Lists. Importing a List once and converting it to a Set will give you a nice performance boost if your List gets large.
And sometimes a few spelling errors which I cannot bother to link (but who cares about that, the compiler sure doesn't).
Still, probably one of the cleaner tutorials I've seen online.
[EDIT] Seems it doesn't like multiline codeblocks in lists :/
The text was updated successfully, but these errors were encountered:
Actually, these also apply to your other repositories. Please actually know what you're doing before you make tutorials for others to soak up your bad practice.
Shout-out from the Spigot forums. Your tutorials have apparently become quite popular, and users often suggest them. Unfortunately, you don't hit the nail on the head every-time which is what is expected of a tutorial. Especially one that is targeted towards beginners.
if (!statement) { return; } // rest of code
overif (statement) { // rest of code }
as it reduces nesting depth by a great deal (EDIT: some classes seem to use it, some don't).And sometimes a few spelling errors which I cannot bother to link (but who cares about that, the compiler sure doesn't).
Still, probably one of the cleaner tutorials I've seen online.
[EDIT] Seems it doesn't like multiline codeblocks in lists :/
The text was updated successfully, but these errors were encountered: