I'm learning Spigot and many tutorials say to use this syntax to initialize a command.
private Main plugin;
public Constructor(Main plugin) {
this.plugin = plugin;
plugin.getCommand("command").setExecutor(this);
}
But my Java knowledge is telling me that this would work as well.
public Command(Main plugin) {
plugin.getCommand("command").setExecutor(this);
}
Is there any difference between the two? Why would one be better to use than the other? Please don't answer with preferences, only pros and cons, or if they do the same thing.