Solved What am i doing wrong?

Discussion in 'Plugin Help/Development/Requests' started by Michiman, Jun 30, 2015.

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


    What am i doing wrong with my plugin? I have been working on it for a few hours now trying tons of different things but nothing seems to work. in console it says Could not load 'plugins\LockDown.jar' in folder 'plugins'.

    here is the code and yes i have the messages page but i do not think that is the problem.

    This is the core

    package me.Michiman;
    import me.Michiman.cmds.Commands;
    import org.bukkit.Bukkit;
    import org.bukkit.plugin.PluginManager;
    public class Core extends JavaPlugin{
        public static Core plugin;
        public static PluginManager pm;
        public void onEnable(){
            plugin = this;
            pm = Bukkit.getPluginManager();
        public void onDisable(){
        private void regCommands(){
            getCommand("lockdown").setExecutor(new Commands(this));

    And this is the commands page.
    package me.Michiman.cmds;
    import me.Michiman.Core;
    import me.Michiman.utils.Messages;
    import org.bukkit.ChatColor;
    import org.bukkit.command.Command;
    import org.bukkit.command.CommandExecutor;
    import org.bukkit.command.CommandSender;
    import org.bukkit.entity.Player;
    public class Commands implements CommandExecutor{
         Core main;
         public Commands(Core instance){
             main = instance;
        public boolean onCommand(CommandSender sender, Command cmd, String label, String[] args) {
            if(!(sender instanceof Player)){
                sender.sendMessage(ChatColor.RED + "You are not a player!");
                return false;
            Player p = (Player) sender;
                if(args.length == 0){
                if(args.length == 1){
                    if(args[0].equalsIgnoreCase("lock") || args[0].equalsIgnoreCase("unlock") || args[0].equalsIgnoreCase("help")){
                        // lockdown leave
                        //lockdown info
                        // lockdown help
                return true;
            return false;

    name: LockDown
    main: me.Michiman.Core
    version: 0.1 Alpha
    author: Michiman
          description: Lockdown server
          usage: </command>
  2. Offline


    Show us full console log. It should tell you what/where is the error.
  3. Question that's got nothing to do with the error: Why is the usage '</command>' and not '/command'?
  4. Offline



    Thats the console log

    Attached Files:

  5. Do you have 2 plugin jars (renamed differently) in the same plugins folder?

    Do you have 2 plugin JARs like Hi.jar and Bye.jar, but both have the same plugin name e.g. Welcome (in the plugin.yml)?

    Edit: Then again, it is run first, therefore can't have happened... I don't know why this is happening, unless you're calling the constructor for the JavaPlugin class, e.g. you're doing new Core().
  6. Moved to Bukkit Alternates.

    Do you have 2 classes extending JavaPlugin and please look at the official tutorials and not YouTube. I'm too tired to list the issues but please just look at the official tutorial.
    KingFaris11 likes this.
  7. Offline


    if you have 2 plugins with the same link to the main class (1 plugin being "me.Michiman.Core" and the other being the same) it will cause this problem.
  8. Offline


    everything is named different in the plugins in the server
  9. @CrystallFTW Look at @KingFaris11's edit. As stated there, that is the first plugin to load, it is impossible to have two of the same plugins when only one has loaded.
    CrystallFTW likes this.
  10. Offline


    That fixed it thank you.

    Locking thread now
    CrystallFTW likes this.
  11. @KingFaris11 Doesn't seem to be Messages because it is static methods being used.

    @Michiman can we please see all your classes in their [code=java][/code] tags or in can we also see the FULL startup log in

    Edit: @Michiman please use the report button when requesting a lock.
  12. ^ Solved xD

    Edit: Wow xD You edited before I posted gg
  13. @KingFaris11 Saw right after I posted :p

    Anyhow, locked upon request.
Thread Status:
Not open for further replies.

Share This Page