Fixed %prettytime% not working on forever time

This commit is contained in:
graywolf336
2015-06-02 23:37:55 -05:00
parent 5393d5556b
commit 98e4916a18
3 changed files with 4 additions and 3 deletions

View File

@@ -146,6 +146,7 @@ public class Util {
msg = msg.replace("%prettytime%", Util.getDurationBreakdown(p.getRemainingTime()));
}else {
msg = msg.replace("%timeinminutes%", Lang.JAILEDFOREVERSIGN.get());
msg = msg.replace("%prettytime%", Lang.JAILEDFOREVERSIGN.get());
}
return getColorfulMessage(msg);
@@ -223,7 +224,7 @@ public class Util {
*/
public static String getDurationBreakdown(long millis) {
if(millis < 0) {
throw new IllegalArgumentException("Duration must be greater than zero!");
return Lang.JAILEDFOREVERSIGN.get();
}
long days = TimeUnit.MILLISECONDS.toDays(millis);

View File

@@ -69,7 +69,7 @@ language:
provideajail: '&cPlease provide a jail to %0% &cthem to.'
resistedarrestjailer: '&c%0% has resisted arrest thanks to having more health than you can jail at.'
resistedarrestplayer: '&cYou have resisted arrest due to having more health than %0% can jail at.'
status: "&2You have been jailed with a reason of '%0%' by %1% and have %2% minutes remaining (%3%)."
status: "&2You have been jailed with a reason of '%0%' by %1% and have %2% minutes remaining (%3%&2)."
suggestedcell: '&cAn empty cell in the same jail, %0%, was found: %1%'
telein: "&9Teleported %0% to %1%'s teleport in location."
teleout: "&9Teleported %0% to %1%'s teleport out location."