Pass the jail name and cell name to the broadcast messages, fixes #53

This commit is contained in:
graywolf336 2015-02-25 10:13:32 -06:00
parent 566c596f07
commit 550c7d5368
2 changed files with 8 additions and 3 deletions

View File

@ -10,7 +10,12 @@ If you want to make some changes, build, and run the unit tests you will notice
`mvn install:install-file -Dfile=craftbukkit-1.8.jar -DgroupId=org.bukkit -DartifactId=craftbukkit -Dversion=1.8-R0.1-SNAPSHOT -Dpackaging=jar`
Beta 4 Changes
Beta 5 Changes
===
*Changes since Beta 4*
* Added the ability to show `reason`, `jail`, and `cell` to the broadcast messages. [#53](https://github.com/graywolf336/Jail/issues/53)
[Beta 4](https://github.com/graywolf336/Jail/releases/tag/v3.0.0-beta.4) Changes
===
*Changes since Beta 3*
* Added `/jail vote`. [Jail Vote Wiki Page](https://github.com/graywolf336/Jail/wiki/Jail-Vote). [#8](https://github.com/graywolf336/Jail/issues/8)

View File

@ -107,9 +107,9 @@ public class PrisonerManager {
String msg = "";
if(prisoner.getRemainingTime() < 0L)
msg = Lang.BROADCASTMESSAGEFOREVER.get(new String[] { prisoner.getLastKnownName(), prisoner.getReason() });
msg = Lang.BROADCASTMESSAGEFOREVER.get(new String[] { prisoner.getLastKnownName(), prisoner.getReason(), jail.getName(), cell == null ? "" : cell.getName() });
else
msg = Lang.BROADCASTMESSAGEFORMINUTES.get(new String[] { prisoner.getLastKnownName(), String.valueOf(prisoner.getRemainingTimeInMinutes()), prisoner.getReason() });
msg = Lang.BROADCASTMESSAGEFORMINUTES.get(new String[] { prisoner.getLastKnownName(), String.valueOf(prisoner.getRemainingTimeInMinutes()), prisoner.getReason(), jail.getName(), cell == null ? "" : cell.getName() });
boolean broadcasted = false;
//Broadcast the message, if it is enabled