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.Command;
|
||||||
import com.graywolf336.jail.command.CommandInfo;
|
import com.graywolf336.jail.command.CommandInfo;
|
||||||
import com.graywolf336.jail.enums.LangString;
|
import com.graywolf336.jail.enums.LangString;
|
||||||
|
import com.graywolf336.jail.enums.Settings;
|
||||||
|
|
||||||
@CommandInfo(
|
@CommandInfo(
|
||||||
maxArgs = 1,
|
maxArgs = 1,
|
||||||
@ -40,6 +41,10 @@ public class UnjailCommand implements Command {
|
|||||||
sender.sendMessage(ChatColor.RED + e.getMessage());
|
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 {
|
}else {
|
||||||
//The player is not currently jailed
|
//The player is not currently jailed
|
||||||
sender.sendMessage(jm.getPlugin().getJailIO().getLanguageString(LangString.NOTJAILED, args[0]));
|
sender.sendMessage(jm.getPlugin().getJailIO().getLanguageString(LangString.NOTJAILED, args[0]));
|
||||||
|
@ -28,6 +28,8 @@ public enum LangString {
|
|||||||
BROADCASTMESSAGEFOREVER ("jailing"),
|
BROADCASTMESSAGEFOREVER ("jailing"),
|
||||||
/** The message sent when we broadcast/log the message for any time above -1. */
|
/** The message sent when we broadcast/log the message for any time above -1. */
|
||||||
BROADCASTMESSAGEFORMINUTES ("jailing"),
|
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. */
|
/** 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"),
|
CANCELLEDBYANOTHERPLUGIN ("jailing"),
|
||||||
/** The message sent when trying to jail someone who can't be jailed by permission. */
|
/** 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.'
|
alreadyjailed: '&cThat player is already jailed.'
|
||||||
broadcastmessageforever: '&9%0% has been jailed forever.'
|
broadcastmessageforever: '&9%0% has been jailed forever.'
|
||||||
broadcastmessageforminutes: '&9%0% has been jailed for %1% minutes.'
|
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.'
|
cancelledbyanotherplugin: '&cJailing %0% was cancelled by another plugin and they did not leave you a message.'
|
||||||
cantbejailed: '&cThat player can not be jailed.'
|
cantbejailed: '&cThat player can not be jailed.'
|
||||||
cellnotempty: '&cThe destination cell, %0%, already has a prisoner in it.'
|
cellnotempty: '&cThe destination cell, %0%, already has a prisoner in it.'
|
||||||
|
Loading…
Reference in New Issue
Block a user