Alright, so let's say, I wanted to create a command called /hi It'd tell the player a random message from the config.yml file. How would that work? I'm clueless. Any help?
Code: section = plugin.getConfig().getConfigurationSection("SECTION_NAME") section.getString(sectionname.message) That will help... edit: just saw you want to add random message, you can gather all messages as explained above, add them to arraylist and retrieve random item from it, how to take random item from ArrayList is explained here: http://stackoverflow.com/questions/5034370/retrieving-a-random-item-from-arraylist
Brixishuge, I know it's a late response, but how would I add the message from the config.yml file to the ArayList?
maxxb123 I believe it's: Code: section = plugin.getConfig().getConfigurationSection("SECTION_NAME") somearraylist.add(section.getString(sectionname.message))
maxxb123 If you are using a list in the config it is pretty simple. Just use the getStringList method from config. However I do not know if this is the case. Would you kindly show us how you have your config set up?