Config Error

Discussion in 'Plugin Development' started by Unknown_Stalker_, Feb 14, 2014.

Thread Status:
Not open for further replies.
  1. Code:java
    1. public static String name = new String(color(ChatColor.RED + "[" + ChatColor.BLUE + getConfig().getString("ServerName") + ChatColor.RED + "]"));
    2.  

    when i make this static it gives me an error at getConfig() in eclipse and i need it to go to another class and it dosn't give me an error in there when i do p.sendMessage(Main.name + ChatColor.RED +"You received the pvp kit");
     
  2. try:
    Code:java
    1. public static String name = ChatColor.RED + "[" + ChatColor.BLUE + getConfig().getString("ServerName") + ChatColor.RED + "]";
     
  3. Still error at getConfig
     
  4. Offline

    Sagacious_Zed Bukkit Docs

    Unknown_Stalker_
    You should read the error. It will give you a better idea as to what you are doing wrong, and to never do the wrong thing again.
     
  5. when i look at the error it says to remove static but i need static to make it go to another class so its like a loop of errors
     
  6. Offline

    Sagacious_Zed Bukkit Docs

    I'm fairly certain that is not what the error message is word for word.
     
Thread Status:
Not open for further replies.

Share This Page