Plugin not being recognized. Halp!

Discussion in 'Plugin Development' started by Blingdaddy1, Oct 15, 2013.

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



    This is the code:

    package me.Blingdaddy1.QuartzHub;

    import org.bukkit.Bukkit;
    import org.bukkit.Location;
    import org.bukkit.command.Command;
    import org.bukkit.command.CommandSender;
    import org.bukkit.entity.Player;

    public class QuartzHub extends JavaPlugin {

    public void onEnable() {
    Bukkit.getServer().getLogger().info("QuartzHub has been enabled!");

    public void onDisable() {
    Bukkit.getServer().getLogger().info("QuartzHub has been disabled!");

    public boolean onCommand(CommandSender sender, Command cmd, String commandLabel, String[] args) {

    Player player = (Player) sender;

    if (cmd.getName().equalsIgnoreCase("lobby")) {
    if (args.length == 0) {
    player.teleport(new Location(Bukkit.getWorld("randombuildings"), -1728, 18, -1414));
    return true;
    if (cmd.getName().equalsIgnoreCase("")) {
    if (args.length == 0) {
    player.teleport(new Location(Bukkit.getWorld("randombuildings"), -1728, 18, -1414));
    return true;


    return true;


  2. Offline


    Nope. Sorry, no. You're gonna have to provide more than that. I assume you are getting an error, a stack trace maybe. You've got to tell us what's wrong, not just that something is wrong.

    If you have a stack trace to show us, please post it.
  3. Offline


    Post your error and plugin.yml. Please use something like or use the code bbc tags to paste code.
  4. Offline


    LOL ok Sorry,

    Well. When I try to do /lobby, it gives me the command not found error.

    Below is an updated code and plugin yml

    The plugin is infact on the server, because I can do /about QuartzHub, and if I do /? QuartzHub, it gives me this:

    /Hello: Set main lobby and casino spawn.

    I've made a plugin called Hello, with that command, but I don't know where it is getting the "hello" from.
  5. Offline


    Your plugin.tml pastein link above:
    This paste has been removed!

    Also your code doesn't register anything.

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
    Last edited by a moderator: Jun 4, 2016
  6. Offline


  7. Offline


    Did you see my second reply? :)

    1. getServer().getPluginManager().registerEvents(..)
  8. Offline


    WauloK Make sure you don't double post next time. The mods don't like that.
  9. Offline


    Aight, here's an updated code. Still the same error. Added the getServer().getPluginManager().registerEvents to onEnable, but the command still doesn't work.
  10. Offline


    Blingdaddy1 Don't worry about WauloK . He doesn't know what he's talking about. You don't need to register any events in this code, as there are no event handler methods and you are not trying to handle events. You also don't need to implement Listener.

    Since you are trying to handle a command call, and the specific command you are trying to handle is "lobby", you need to register "lobby" in your plugin.yml. At the moment the only command you have registered is "hello".

    If you replace "hello" with "lobby" in your plugin.yml it should work all fine.
  11. Offline


    Umm. Why do you have about two enters in the plugin.yml?
    1. name: QuartzHub
    2. version: 1.0
    3. main: me.Blingdaddy1.QuartzHub.QuartzHub
    4. author: NexodusMC
    5. description: QuartzHub is the plugin that controls the main "Hub" based lobbies. Plugin made by Blingdaddy1. [url][/url]
    8. commands:
    9. hello:
    10. usage: /<command>
    11. description: Set main Hub, and Casino Hub.
  12. Offline


    Everything's fixed.
Thread Status:
Not open for further replies.

Share This Page