Implement %prettytime% on signs, time in a pretty format. Adds #35

The variable of %prettytime% will be replaced on signs and also a nice
format on the status message will be added.
This commit is contained in:
graywolf336
2015-01-27 19:21:42 -06:00
parent 72c29bb4ea
commit 87acaf1538
5 changed files with 63 additions and 10 deletions

View File

@ -4,6 +4,7 @@ import org.bukkit.command.CommandSender;
import org.bukkit.entity.Player;
import com.graywolf336.jail.JailManager;
import com.graywolf336.jail.Util;
import com.graywolf336.jail.beans.Prisoner;
import com.graywolf336.jail.command.Command;
import com.graywolf336.jail.command.CommandInfo;
@ -25,7 +26,7 @@ public class JailStatusCommand implements Command{
if(jm.isPlayerJailed(pl.getUniqueId())) {
Prisoner p = jm.getPrisoner(pl.getUniqueId());
//They are jailed, so let's tell them some information
sender.sendMessage(Lang.STATUS.get(new String[] { p.getReason(), p.getJailer(), String.valueOf(p.getRemainingTimeInMinutes()) }));
sender.sendMessage(Lang.STATUS.get(new String[] { p.getReason(), p.getJailer(), String.valueOf(p.getRemainingTimeInMinutes()), Util.getDurationBreakdown(p.getRemainingTime()) }));
}else {
//the sender of the command is not jailed, tell them that
sender.sendMessage(Lang.YOUARENOTJAILED.get());