Log the unjailing to console if we have that enabled.
This commit is contained in:
@ -9,6 +9,7 @@ import com.graywolf336.jail.beans.Jail;
|
||||
import com.graywolf336.jail.command.Command;
|
||||
import com.graywolf336.jail.command.CommandInfo;
|
||||
import com.graywolf336.jail.enums.LangString;
|
||||
import com.graywolf336.jail.enums.Settings;
|
||||
|
||||
@CommandInfo(
|
||||
maxArgs = 1,
|
||||
@ -40,6 +41,10 @@ public class UnjailCommand implements Command {
|
||||
sender.sendMessage(ChatColor.RED + e.getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
if(jm.getPlugin().getConfig().getBoolean(Settings.LOGJAILING.getPath())) {
|
||||
jm.getPlugin().getLogger().info(jm.getPlugin().getJailIO().getLanguageString(LangString.BROADCASTUNJAILING, new String[] { args[0], sender.getName() }));
|
||||
}
|
||||
}else {
|
||||
//The player is not currently jailed
|
||||
sender.sendMessage(jm.getPlugin().getJailIO().getLanguageString(LangString.NOTJAILED, args[0]));
|
||||
|
@ -28,6 +28,8 @@ public enum LangString {
|
||||
BROADCASTMESSAGEFOREVER ("jailing"),
|
||||
/** The message sent when we broadcast/log the message for any time above -1. */
|
||||
BROADCASTMESSAGEFORMINUTES ("jailing"),
|
||||
/** The message sent to the broadcast/log the unjailing of someone. */
|
||||
BROADCASTUNJAILING ("jailing"),
|
||||
/** The message sent to the sender when trying to jail someone and a plugin cancels it but doesn't leave a message why. */
|
||||
CANCELLEDBYANOTHERPLUGIN ("jailing"),
|
||||
/** The message sent when trying to jail someone who can't be jailed by permission. */
|
||||
|
Reference in New Issue
Block a user