I need help on how to get time value from a config file. Here is my code bellow, Code: new BukkitRunnable() { public void run() { h.delete(); } } .runTaskLater(this, 1500L); } I want players to be able to change the time of the runnable event in the config file, I have already got the config file to create the integer just don't know how to get the value from it in a simple term
Consult this link here: http://wiki.bukkit.org/Configuration_API_Reference It explains Bukkit's Configuration API as well as a guide to creating your own config files.
Thank you both ( Gater12 and FerusGrim ) but I still don't understand how. I have implmented the Code:java get.Config().getInt("path.to.my.int); But it still dosent work
FerusGrim I meant that sorry, Here is my current code now Code:java new BukkitRunnable() { public void run() { h.delete(); } } .runTaskLater(this, getConfig().getInt("Auto-Remove-Time"));
FerusGrim Well if you put it in the config in seconds you might want to do something like Code:java long l = (long) getConfig().getInt("path") * 20;
FerusGrim @The Fancy Whale so I still cant get it to work, here is my current new code Code:java new BukkitRunnable(){long l = (long) getConfig().getInt("Auto-Remove-Time") * 20;public void run() {h.delete();}}.runTaskLater(this, getConfig().getInt("Auto-Remove-Time"));