Hello I am new to Minecraft coding I just started today and I'm trying to make a spigot Minecraft plugin. When I start my server using Intellij it starts, but when I do /plugins it says "Plugins (0):" that means there is no plugins so how do I add my plugin to the plugins folder or with code or something?
Here is my main java file: Link
And Here is my plugin.yml file: Link
Help would be appreciated! Thanks
I see you are using apache maven, you have to run package
command, then go to /target
folder, and you move the built .jar file to plugin folder of your server. Only then you can start your sever. Also, please provide server logs the next time you are asking question.
tldr; package
-> move your .jar file from /target to /plugins
Also your code is wrong:
Player player = null; // player is now null, you cannot send message to null player. This is bad.
should be
Player player = (Player) commandSender; // cast command sender to player, that is good. You can now send message.