Error but can't see any error

Discussion in 'Spigot Plugin Development' started by Waterman2707, May 26, 2015.

  1. Hey i will start out by saying sry for my really bad questions, but this time i really cant see the error...
    The code is
    Code (Text):
        public void onEnable(){
            config.options().copyDefaults(true);
            saveConfig();
         
            if (!setupEconomy() ) {
                getLogger().severe(String.format("[%s] - Disabled due to no Vault dependency found!", getDescription().getName()));
                getServer().getPluginManager().disablePlugin(this);
                return;
            }
         
            FileConfiguration config2 = YamlConfiguration.loadConfiguration(getResource("plugin.yml"));
            for(String cmd : config2.getConfigurationSection("commands").getKeys(false)){
                if(cmd.equals("referer")){
                    getCommand(cmd).setUsage(ChatColor.GOLD + "/referer [" + ChatColor.WHITE + "Name" + ChatColor.GOLD + "]");
                }
            }
         
        }
     
        private boolean setupEconomy() {
            if (getServer().getPluginManager().getPlugin("Vault") == null) {
                return false;
            }
            RegisteredServiceProvider<Economy> rsp = getServer().getServicesManager().getRegistration(Economy.class);
            if (rsp == null) {
                return false;
            }
            econ = rsp.getProvider();
            return econ != null;
        }
    There are not any errors here http://prntscr.com/79lyx2
    But there is one here http://prntscr.com/79lz5o

    OBS it worked earlyer but then i added this
    Code (Text):
    FileConfiguration config2 = YamlConfiguration.loadConfiguration(getResource("plugin.yml"));
            for(String cmd : config2.getConfigurationSection("commands").getKeys(false)){
                if(cmd.equals("referer")){
                    getCommand(cmd).setUsage(ChatColor.GOLD + "/referer [" + ChatColor.WHITE + "Name" + ChatColor.GOLD + "]");
                }
            }
    and now it not work even if i remove it again, still same error
     
  2. Try to restart your eclipse. I think this is bug in eclipse.
     
  3. Have you looked in the error log in Window -> Show View -> Error Log ?
     
  4. Have tried twice... :S
     
  5. Does the code work when you export it and run it on your server?
     
  6. You cannot export it with a error...
     
  7. Have you tried cleaning the project?
    Project >> Clean
     
  8. You mean?...
     
  9. Just try it XD
     
  10. Okay, i still not know what that get it to work, but now i work thanks to you all ;)