Fix chat-msgs
Signed-off-by: Lixfel <agga-games@gmx.de>
Dieser Commit ist enthalten in:
Ursprung
8c3df0e1dd
Commit
d9f1617235
@ -170,6 +170,8 @@ public class BungeeCore extends Plugin {
|
||||
send(player, ChatMessageType.SYSTEM, msg, onHover, onClick);
|
||||
}
|
||||
public static void send(ProxiedPlayer player, ChatMessageType type, String msg, String onHover, ClickEvent onClick){
|
||||
if(type == ChatMessageType.CHAT && player.getChatMode() != ProxiedPlayer.ChatMode.SHOWN)
|
||||
return;
|
||||
TextComponent message = stringToText(msg);
|
||||
if(onHover != null)
|
||||
message.setHoverEvent(new HoverEvent(HoverEvent.Action.SHOW_TEXT, TextComponent.fromLegacyText(onHover)));
|
||||
|
@ -88,6 +88,8 @@ public class Message {
|
||||
}
|
||||
|
||||
public static void send(String message, boolean prefixed, CommandSender sender, ChatMessageType type, String onHover, ClickEvent onClick, Object... params){
|
||||
if(type == ChatMessageType.CHAT && sender instanceof ProxiedPlayer && ((ProxiedPlayer)sender).getChatMode() != ProxiedPlayer.ChatMode.SHOWN)
|
||||
return;
|
||||
TextComponent msg = parseToComponent(message, prefixed, sender, params);
|
||||
if(onHover != null)
|
||||
msg.setHoverEvent(new HoverEvent(HoverEvent.Action.SHOW_TEXT, TextComponent.fromLegacyText(onHover)));
|
||||
|
In neuem Issue referenzieren
Einen Benutzer sperren