From 4a45229bc5268dc673dee974725e9985d236b8e7 Mon Sep 17 00:00:00 2001 From: graywolf336 Date: Tue, 24 Dec 2013 10:23:39 -0600 Subject: [PATCH] Send the online prisoner the jailed message with the reason. --- .../com/graywolf336/jail/command/commands/JailCommand.java | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/main/java/com/graywolf336/jail/command/commands/JailCommand.java b/src/main/java/com/graywolf336/jail/command/commands/JailCommand.java index 8dc7469..8381028 100644 --- a/src/main/java/com/graywolf336/jail/command/commands/JailCommand.java +++ b/src/main/java/com/graywolf336/jail/command/commands/JailCommand.java @@ -14,6 +14,7 @@ import com.graywolf336.jail.beans.Prisoner; import com.graywolf336.jail.command.Command; import com.graywolf336.jail.command.CommandInfo; import com.graywolf336.jail.command.parameters.JailParameters; +import com.graywolf336.jail.enums.LangString; import com.graywolf336.jail.events.PrisonerJailedEvent; @CommandInfo( @@ -98,6 +99,12 @@ public class JailCommand implements Command { //Player *is* online sender.sendMessage(pris.getName() + " is online and will be jailed for " + pris.getRemainingTime() + " milliseconds in the jail " + params.jail() + " in the cell " + params.cell() + " and will be muted: " + pris.isMuted() + "."); sender.sendMessage(pris.getName() + " will be jailed for " + TimeUnit.MINUTES.convert(pris.getRemainingTime(), TimeUnit.MILLISECONDS) + " minutes by " + jailer + "."); + + if(params.reason().isEmpty()) { + p.sendMessage(jm.getPlugin().getJailIO().getLanguageString(LangString.JAILED)); + }else { + p.sendMessage(jm.getPlugin().getJailIO().getLanguageString(LangString.JAILEDWITHREASON, new String[] { params.reason() })); + } } return true;