Solved Plugin Created Not Showing up in Server

Discussion in 'Plugin Development' started by HexLazer205, Sep 9, 2014.

Thread Status:
Not open for further replies.
  1. Offline


    Hi, I created a small plugin called TestPlugin, and I followed the bukkit wiki page to create it. I created a pom.xml and everything worked, I logged my test command properly into the plugin.yml and it even created the plugin without any errors when I ran it as Maven install. I uploaded it to my server, but it won't show up! /plugin says "Plugins (0):" and it was uploaded, I even checked. Can someone please tell me what I'm doing wrong or what I have to do?

    package net.hexgalaxymc.testplugin;
    import org.bukkit.command.Command;
    import org.bukkit.command.CommandSender;
    public final class TestPlugin extends JavaPlugin {
    public void onEnable() {
    getLogger().info("onEnable has been invoked!");
    public void onDisable() {
    getLogger().info("onDisable has been invoked!");
    public boolean onCommand(CommandSender sender, Command cmd, String label, String[] args) {
    if (cmd.getName().equalsIgnoreCase("command")) {
    sender.sendMessage("You have run the test command.");
    return true;
    return false;
    And the plugin.yml:
    name: TestPlugin
    main: net.hexgalaxymc.testplugin
    version: 1.0.0
          description: This is a test command.
          usage: /<command> [player]
          permission: tp.command
          permission-message: You do not have the required permission <permission>
    Also, I own the domain, however I did not forward it to any websites, so you won't get anything by entering it in your browser. It shouldn't be the problem, but if it is, let me know, and what I can do to fix it.

    Thanks in advance :)
  2. Offline


    In your plugin.yml you did not put the full path to the main class, so the plugin loader doesn't know which class to set as the main class
  3. Offline


    as Rocoty stated, you didn't put the full path to your main class, to elaborate on it, here's what you want:
    1. main: net.hexgalaxymc.testplugin
    add ".TestPlugin" to the end of that.
  4. Offline


    If you re-read the plugin.yml, in the second line, it has the "main: net.hexgalaxymc.testplugin" already. Are you saying I have to have "TestPlugin" instead of "testplugin"? I thought I was mistakenly running it on the wrong version until I switched the version to the correct version. Sadly, the plugin still was not recognized. I am new to Java plugin development, and I am still confused as to what I have done wrong. I followed the thoroughly, and did everything it said to set it up. I have created a test command the way it did, I put it so it outputs "You have run the test command." message to the sender, as you see in the code, and I have done all of this without any errors. No errors showed up in eclipse, it ran the maven install properly, etc., AdamQpzm what do you mean by provide full startup log?
  5. Offline


    main should have the location of your JavaPlugin extended class. Location being the package it is in and the class name.
    In your case it would be: net.hexgalaxymc.testplugin.TestPlugin
  6. Offline


    teej107 To clarify some terminology, what you refer to as location is called fully qualified name
    teej107 likes this.
  7. Offline


    WOW!!! Thanks so much you guys! Each of you was very helpful, thanks! I saw your posts and I found out that you meant I need net.hexgalaxymc.testplugin.TestPlugin in plugin.yml. I did that, uploaded the plugin and everything runs just as expected! Without your help, I wouldn't have been able to do this :D Thanks again!
Thread Status:
Not open for further replies.

Share This Page