Reputation:
I am making a Craftbukkit plugin that has a message in the player count list, Like HIVEmc or Omega Realm. I am coding in Ecplise and using ProtocolLib v3.2.0 and Craftbukkit 1.7.2 R0.3. I am new to java and don't understand it much. SO FAR... Here is my code and the error
public void onEnable() {
saveConfig();
if(!new File(getDataFolder(),"RESET.FILE").exists()){
try {
getConfig().set("Message",
Arrays.asList("First Line","Second Line"));
new File(getDataFolder(),"RESET.FILE").createNewFile();
} catch (IOException e) {
e.printStackTrace();
}
}
}
ERROR: The method asList(T[]) in the type Arrays is not applicable for the arguments (String, String) http://tinypic.com/r/n6yond/8
Upvotes: 0
Views: 290
Reputation: 11483
Try using this:
Arrays.asList(new String[]{"First Line", "Second Line"}));
Upvotes: 1