mam pewien skrypt :
private Date getLiveDate(DeadPlayer player) {
if (_plugin.getHardcoreConfiguration().useResurrectionDay) {
//if they died before the start, they can come back after the start
if (player.getDeathDate().before(_plugin.getHardcoreConfiguration().resurrectionDayStart))
return _plugin.getHardcoreConfiguration().resurrectionDayStart;
//if they died after the start, they can come back at the end
else
return _plugin.getHardcoreConfiguration().resurrectionDayEnd;
} else {
DateFormat dateFormat = new SimpleDateFormat("yyyy/MM/dd HH:mm:ss");
//wow java date math is a pain
Calendar c = Calendar.getInstance();
c.setTime(player.getDeathDate());
c.add(Calendar.SECOND, _plugin.getHardcoreConfiguration().deathSeconds);
return dateFormat.format(c.getTime());
}
i przy return dateFormat.format(c.getTime());
wyrzuca mi błąd
Type mismatch: cannot convert from String to Date
może wie ktoś jak rozwiązać ten problem?