Introduction

First of all welcome to my own Java tutorial! I appreciate you reading the intro instead of skipping it, thinking it has nothing to offer for you. Truth is: it does!

Generally saying

If you are here, then maybe my tutorial is your last straw, or you found me quickly through discord. Whatever the case, you are here for a reason. I have been where you are right now, trying to find a tutorial that teaches me what I want to know and skips all the unnecessary bullshit that I have no interest in learning. Unfortunately, most tutorials or resource sites immediately slap you with terms such as ‘Interface’ or ‘Bytecode’. Here you are, reading a sentence in which every second word you do not yet know the meaning of, so the text or what was said in a video tutorial makes zero sense to you. This quickly leads to frustration and self doubt before you even started: “If the ‘beginners tutorial’ starts with these things already, maybe I should know this and am not even ready/qualified/smart enough to start. So why bother?” Those were pretty much my thoughts. Little did I realize that most of these guides are bullshit – they are written by people who have already mastered Java or even worse: multiple different programming languages and they have forgotten what it’s like to be lost in the jungle of code. So to them, everything makes sense – but to someone who has never even so much as touched java, well… it’s a disaster.

Learning how to learn

For me, theoretical lessons don’t work. This is why I sucked in school when it came to history or geography classes. Just learning sentences one by one is not my strong suit. I learn best when topics are dynamic and offer a way to practice them such as math, languages, arts and so forth. If you are a person who best learns like that, you will love my tutorials since I aim to design it to keep it interesting as much as I can.
Also, through my career as supporter in different fields, I did notice that even paid video tutorials do not help me much. The best way I learn is by teaching. If I can simplify and explain something in text and reading it after a day or so and it still makes sense to me, then I succeeded in understanding it to 100%.

My source – where I learn from

My biggest source in learning java is the video series of ‘MineAcademy’. It is very much hated, along with it’s creator. After having heard stories about him and also being spammed with newsletters and seeing his way of advertisement every place he can, which feels very forceful and ‘in your face’, I do agree with the haters’ points, but I disagree on setting his ass on fire. His tutorials helped me grasp some of the very basics and are oriented around java with minecraft as subject. He does not teach anything one will never need in minecraft plugin coding and that is one thing that had me interested in buying his online course. I personally don’t like his voice and accent. Pronouncing ‘this’ like ‘dis’ and so forth makes it very energy draining to listen to him talk in his tutorials because you have to think about what you actually just now heard – in some videos I am still not sure what some words were meant to be. On top of that, I believe that the transition from week 3 to week 4 in the MineAcademy tutorials is harsh and edgy. He went on slowly explaining everything in the first three weeks videos, and starting week 4 videos throwing infos way too fast in my opinion. It feels very much like he became timely pressured to finish his series at this point or he lost patience.

Where I am at

As explained above, I am currently enduring the slapping of week 4 of MineAcademy’s tutorials. This seems to be the week where you either eat or die. Don’t get me wrong, things he teaches in week 4 are explained and make sense, he shows examples on screen and explains what he’s doing but dear god- slow donw!
So why am I starting a tutorial series when I am not even yet half way through and don’t know much myself? Easy. Because I still know what it’s like to know literally nothing and I also know that I learn best by teaching – so I teach, which will also benefit me and make me repeat things over and over while helping others and myself as side product.

The actual problem with tutorials

The problem with most tutorials is that they teach you something, but they do not give you anything to practice what you just learned. In some videos, the creator of the tutorials I am following did indeed give the viewer ‘Homework’ to do. But in many cases, he doesn’t. How are you supposed to keep something you learned long term if you didn’t get some practices? This is why children get homework at school. Going to a more extreme comparison: try teaching a dog to give you his paw one day until it works, and the next day ask him to do it again – you will notice that the dog will not be sure at first, you literally see his memory kick in on his face, the dog may also need to get a few hints, such as you touching his leg until it clicks. You just cannot teach something once and then let it be and throw the next trick at someone. Things learned need to be repeated over and over, in different environments and over time to really stick with you. This is what I’ll be doing! I will show you how to do stuff, then – in between learning new things, I will either give you homework and/or ask you to fill out forms that will refresh your knowledge about things you may have learned here a week or longer ago, making sure you don’t forget.

Sticking with what you need

What I want to do here is provide a general understanding of what java is and how it works, but only so much that you can start making your own plugins and then advance all by yourself, which is the greatest feeling you will have. Doing something on your very own is the ultimate goal, but you need the bases first to be able to do so. You will also need encouragement to not quit and stick with what you decided you want to do. We are not going to learn anything here that you will never need. Java is way, way bigger than just minecraft. Java is everywhere and there are so many things you literally don’t need to know when wanting to create plugins. Yes, you will need to know many things, but by far not all about java. Some things will, after a while, naturally come to you.

Think like a machine

You will sooner or later realize that you think very differently from a machine. For a machine, or a program, nothing exists at first. It is being triggered to load/start by another instance, such as you pressing the power button, or a java plugin being loaded by a server when it starts. We have all seen it in our consoles. You have also most likely seen plugin startup messages, most these days appear in color, telling you it was started, telling you it hooked into another plugin or not and so on. But did you know that all these messages are actually put there by the maker of the plugin? There is one single message by the server “Loaded/enabled <pluginname>” – in plain white, that’s it. Everything else you see was set by the dev. Not much work, you may think. Not yet anyway. Let me tell you though: every single ingame message, every single function such as reloading the plugin, checking if what the user put inside the config and print proper, understandable messages about the mistakes made in the config, printing messages to a player, get a players position in the world if needed, checking for the item the player is currently holding or simply setting the time of the minecraft day – all this needs to be put together in order to work. You will have small pieces that java and spigot offer, and you have to put them together in the correct order, write permission checks, hell, you will even have to decide if you want to add all your commands to the tab-completion feature ingame (when you write “/” in chat and all commands pop up in the suggestions) or if you go further than most devs and only add the suggestions based on what permissions the player has. This is an often wanted feature and requires the writing of a tab-complete permission checker. Many devs didn’t or don’t do that. It is a lot of work. For quite some time from here on, you will feel like you are fighting the world all by yourself. It will require dedication and you to organize yourself. You will have to start small – even a chat plugin is more work than you may think. Calculating hex colors and the length of the message to make a proper gradient is massive work. I tried that, and failed. If you think your first plugin will be a chat plugin or a whole gamemode such as a bedwars plugin, you are terribly mistaken. You will not be able to. You have to think smaller. This is the mistake I made at first and I got so frustrated, that I quit for a while. But I am back and ready to face whatever may come my way. Are you with me?