I'm having a little trouble making a temp ban plugin. Basically here's what I'm trying to do. Code: Bukkit.getServer().getBanList(BanList.Type.NAME).addBan(ban.getName(), settings.getData().getString("Reason." + ban.getName() + " For: " + time1), current, p.getName()); And for current I need a way of getting the current date, adding a certain amount of days or hours. If I use Code: current.setDate(arg0); it doesn't change the month if it goes over 31 it just sets the day back to 1. For example if its the first of December and I add 40 days it would be the 9th of December when it really should be the 9th of January.
@King_Amun_Ra Use SimpleDateFormat and do your operations and then back to date But i think you can get date by Milisec so add days on miliseconds and then parse them to date object, there are few tutorials on the internet to do this :#