Get the muted message from the Language File
This commit is contained in:
parent
369c874add
commit
ab74a158b8
@ -17,6 +17,8 @@ public enum LangString {
|
|||||||
JAILED ("jailing"),
|
JAILED ("jailing"),
|
||||||
/** The message sent when players are jailed with a reason. */
|
/** The message sent when players are jailed with a reason. */
|
||||||
JAILEDWITHREASON ("jailing"),
|
JAILEDWITHREASON ("jailing"),
|
||||||
|
/** The message sent when players are jailed and they try to talk. */
|
||||||
|
MUTED ("jailing"),
|
||||||
/** The message sent when players are released from jail. */
|
/** The message sent when players are released from jail. */
|
||||||
UNJAILED ("jailing"),
|
UNJAILED ("jailing"),
|
||||||
|
|
||||||
|
@ -3,7 +3,6 @@ package com.graywolf336.jail.listeners;
|
|||||||
import java.util.HashSet;
|
import java.util.HashSet;
|
||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
|
|
||||||
import org.bukkit.ChatColor;
|
|
||||||
import org.bukkit.Location;
|
import org.bukkit.Location;
|
||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
import org.bukkit.event.EventHandler;
|
import org.bukkit.event.EventHandler;
|
||||||
@ -18,6 +17,7 @@ import com.graywolf336.jail.JailManager;
|
|||||||
import com.graywolf336.jail.Util;
|
import com.graywolf336.jail.Util;
|
||||||
import com.graywolf336.jail.beans.Jail;
|
import com.graywolf336.jail.beans.Jail;
|
||||||
import com.graywolf336.jail.beans.Prisoner;
|
import com.graywolf336.jail.beans.Prisoner;
|
||||||
|
import com.graywolf336.jail.enums.LangString;
|
||||||
import com.graywolf336.jail.enums.Settings;
|
import com.graywolf336.jail.enums.Settings;
|
||||||
|
|
||||||
public class PlayerListener implements Listener {
|
public class PlayerListener implements Listener {
|
||||||
@ -53,7 +53,7 @@ public class PlayerListener implements Listener {
|
|||||||
if(pl.getJailManager().isPlayerJailed(event.getPlayer().getName())) {
|
if(pl.getJailManager().isPlayerJailed(event.getPlayer().getName())) {
|
||||||
if(pl.getJailManager().getPrisoner(event.getPlayer().getName()).isMuted()) {
|
if(pl.getJailManager().getPrisoner(event.getPlayer().getName()).isMuted()) {
|
||||||
event.setCancelled(true);
|
event.setCancelled(true);
|
||||||
event.getPlayer().sendMessage(ChatColor.RED + "Stop talking, you're currently jailed and muted.");
|
event.getPlayer().sendMessage(pl.getJailIO().getLanguageString(LangString.MUTED));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -9,6 +9,7 @@ language:
|
|||||||
defaultjailedreason: Breaking the rules.
|
defaultjailedreason: Breaking the rules.
|
||||||
jailed: '&cYou have been jailed!'
|
jailed: '&cYou have been jailed!'
|
||||||
jailedwithreason: '&cYou have been jailed for: %0%'
|
jailedwithreason: '&cYou have been jailed for: %0%'
|
||||||
|
muted: '&cStop talking, you are in jail.'
|
||||||
unjailed: '&2You have been released! Please respect the server rules.'
|
unjailed: '&2You have been released! Please respect the server rules.'
|
||||||
handcuffing:
|
handcuffing:
|
||||||
cantbehandcuffed: '&9%0% &ccan not be handcuffed.'
|
cantbehandcuffed: '&9%0% &ccan not be handcuffed.'
|
||||||
|
Loading…
Reference in New Issue
Block a user