Log the unjailing to console if we have that enabled.
This commit is contained in:
parent
cb22fe9786
commit
d6ad4df991
@ -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. */
|
||||
|
@ -26,6 +26,7 @@ language:
|
||||
alreadyjailed: '&cThat player is already jailed.'
|
||||
broadcastmessageforever: '&9%0% has been jailed forever.'
|
||||
broadcastmessageforminutes: '&9%0% has been jailed for %1% minutes.'
|
||||
broadcastunjailing: '&9%0% has been unjailed by %1%.'
|
||||
cancelledbyanotherplugin: '&cJailing %0% was cancelled by another plugin and they did not leave you a message.'
|
||||
cantbejailed: '&cThat player can not be jailed.'
|
||||
cellnotempty: '&cThe destination cell, %0%, already has a prisoner in it.'
|
||||
|
Loading…
Reference in New Issue
Block a user