Add the reason why someone was jailed to the broadcast message, #53
This commit is contained in:
parent
6376f0d505
commit
566c596f07
@ -107,9 +107,9 @@ public class PrisonerManager {
|
||||
String msg = "";
|
||||
|
||||
if(prisoner.getRemainingTime() < 0L)
|
||||
msg = Lang.BROADCASTMESSAGEFOREVER.get(prisoner.getLastKnownName());
|
||||
msg = Lang.BROADCASTMESSAGEFOREVER.get(new String[] { prisoner.getLastKnownName(), prisoner.getReason() });
|
||||
else
|
||||
msg = Lang.BROADCASTMESSAGEFORMINUTES.get(new String[] { prisoner.getLastKnownName(), String.valueOf(prisoner.getRemainingTimeInMinutes()) });
|
||||
msg = Lang.BROADCASTMESSAGEFORMINUTES.get(new String[] { prisoner.getLastKnownName(), String.valueOf(prisoner.getRemainingTimeInMinutes()), prisoner.getReason() });
|
||||
|
||||
boolean broadcasted = false;
|
||||
//Broadcast the message, if it is enabled
|
||||
|
@ -43,8 +43,8 @@ language:
|
||||
jailing:
|
||||
afkkickmessage: '&cYou can not be afk while being jailed.'
|
||||
alreadyjailed: '&c%0% is already jailed.'
|
||||
broadcastmessageforever: '&9%0% has been jailed forever.'
|
||||
broadcastmessageforminutes: '&9%0% has been jailed for %1% minutes.'
|
||||
broadcastmessageforever: '&9%0% has been jailed forever for: &c%1%'
|
||||
broadcastmessageforminutes: '&9%0% has been jailed for %1% minutes for: &c%2%'
|
||||
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.'
|
||||
|
@ -92,8 +92,8 @@ public class TestJailLanguage {
|
||||
public void testJailingLanguage() {
|
||||
assertEquals(colorize("&cYou can not be afk while being jailed."), Lang.AFKKICKMESSAGE.get());
|
||||
assertEquals(colorize("&cgraywolf336 is already jailed."), Lang.ALREADYJAILED.get("graywolf336"));
|
||||
assertEquals(colorize("&9graywolf336 has been jailed forever."), Lang.BROADCASTMESSAGEFOREVER.get("graywolf336"));
|
||||
assertEquals(colorize("&9graywolf336 has been jailed for 60 minutes."), Lang.BROADCASTMESSAGEFORMINUTES.get(new String[] { "graywolf336", "60"}));
|
||||
assertEquals(colorize("&9graywolf336 has been jailed forever for: &cSome cool reason."), Lang.BROADCASTMESSAGEFOREVER.get(new String[] { "graywolf336", "Some cool reason." }));
|
||||
assertEquals(colorize("&9graywolf336 has been jailed for 60 minutes for: &cSome cool reason."), Lang.BROADCASTMESSAGEFORMINUTES.get(new String[] { "graywolf336", "60", "Some cool reason."}));
|
||||
assertEquals(colorize("&9graywolf336 has been unjailed by console."), Lang.BROADCASTUNJAILING.get(new String[] { "graywolf336", "console" }));
|
||||
assertEquals(colorize("&cJailing graywolf336 was cancelled by another plugin and they did not leave you a message."), Lang.CANCELLEDBYANOTHERPLUGIN.get("graywolf336"));
|
||||
assertEquals(colorize("&cThat player can not be jailed."), Lang.CANTBEJAILED.get());
|
||||
|
Loading…
Reference in New Issue
Block a user