I've been trying to solve this for 3 hours now and am new at coding, everytime i type my command it just gives no response at all. Console: https://pastebin.com/VGG5bjNw Main: https://pastebin.com/sR3vbmeh Commands i want to execute (2): https://pastebin.com/0uXzP8Qm https://pastebin.com/t4rKw8kJ Plugin.yml https://pastebin.com/pLVaCt7U The problem is i don't see any errors in eclipse and i can't find out what i'm doing wrong every youtube video just results in the same end, no response.
You have to add the commands to plugin.yml OnEnable should be onEnable() OnDisable should be onDisable() Case sensitive stuff
Sorry i forgot to show you the plugin.yml i think already have added it correct https://pastebin.com/pLVaCt7U
Yeah don't change that Spoiler: Actual Main Class Code (Text): package com.hibba.plugin; import java.util.logging.Logger; import org.bukkit.event.Listener; import org.bukkit.plugin.PluginDescriptionFile; import org.bukkit.plugin.java.JavaPlugin; import commands.captcha; import commands.spawn; public class Plugin extends JavaPlugin implements Listener { public void onEnable() { this.getCommand("spawn").setExecutor(new spawn()); this.getCommand("captcha").setExecutor(new captcha()); //PluginDescriptionFile pdfFile = getDescription(); //Logger logger = getLogger(); // No need as spigot/bukkit already does that //logger.info(pdfFile.getName() + "Plugin loaded! (Version" // + pdfFile.getVersion() + ")"); } public void onDisable() { //PluginDescriptionFile pdfFile = getDescription(); //Logger logger = getLogger(); // No need as spigot/bukkit already does that //logger.info(pdfFile.getName() + "Plugin Not Loaded! (Version" // + pdfFile.getVersion() + ")"); } }
If this was git you would see changes in your main class that would make it have WAYY less lines. I took out obsolete logging, changes to method names ("OnEnable" -> "onEnable" and "OnDisable" -> "onDisable")
Stick to the java conventions, and add the @Override annotation whenever overriding methods, it'll save you from these kind of issues