Send a message to the sender when they transfer someone...hehe whoops.

This finalizes the development piece of #5, just need to test it.
This commit is contained in:
graywolf336 2014-02-12 13:42:45 -06:00
parent 65f4f47cca
commit f774bf335f
3 changed files with 13 additions and 0 deletions

View File

@ -105,6 +105,13 @@ public class JailTransferCommand implements Command {
jm.getJailPlayerIsIn(params.getPlayer()).getCellPrisonerIsIn(params.getPlayer()),
target, targetCell, jm.getPrisoner(params.getPlayer()));
//Send the messages to the sender, if no cell then say that but if cell send that as well
if(targetCell == null) {
sender.sendMessage(jm.getPlugin().getJailIO().getLanguageString(LangString.TRANSFERCOMPLETENOCELL, new String[] { params.getPlayer(), target.getName() }));
}else {
sender.sendMessage(jm.getPlugin().getJailIO().getLanguageString(LangString.TRANSFERCOMPLETECELL, new String[] { params.getPlayer(), target.getName(), targetCell.getName() }));
}
return true;
}
}

View File

@ -74,6 +74,10 @@ public enum LangString {
TELEIN ("jailing"),
/** The message sent to the sender when they teleport someone to a jail's teleport out location. */
TELEOUT ("jailing"),
/** The message sent to the sender when they transfer someone to a jail and a cell. */
TRANSFERCOMPLETECELL ("jailing"),
/** The message sent to the sender when they transfer someone to a jail. */
TRANSFERCOMPLETENOCELL ("jailing"),
/** The message sent to the player when they get transferred to a new jail. */
TRANSFERRED ("jailing"),
/** The message sent when players are released from jail. */

View File

@ -52,6 +52,8 @@ language:
suggestedcell: '&cAn empty cell in the same jail, %0%, was found: %1%'
telein: "&9Teleported %0% to %1%'s teleport in location."
teleout: "&9Teleported %0% to %1%'s teleport out location."
transfercompletecell: '&2Successfully transferred %0% to %1% in the cell %2%.'
transfercompletenocell: '&2Successfully transferred %0% to %1%.'
transferred: '&9You have been transferred to %0%.'
unjailed: '&2You have been released! Please respect the server rules.'
willbeunjailed: '&2%0% will be released the next time they log on.'