mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2025-06-27 11:14:44 +02:00
Fix Hex-Colored names in parties/admin chat
This commit is contained in:
@ -3,6 +3,7 @@ package com.gmail.nossr50.events.chat;
|
||||
import com.gmail.nossr50.chat.author.Author;
|
||||
import com.gmail.nossr50.chat.message.AbstractChatMessage;
|
||||
import com.gmail.nossr50.chat.message.ChatMessage;
|
||||
import com.gmail.nossr50.datatypes.chat.ChatChannel;
|
||||
import net.kyori.adventure.audience.Audience;
|
||||
import net.kyori.adventure.text.Component;
|
||||
import net.kyori.adventure.text.TextComponent;
|
||||
@ -57,23 +58,13 @@ public abstract class McMMOChatEvent extends Event implements Cancellable {
|
||||
return plugin;
|
||||
}
|
||||
|
||||
/**
|
||||
* The display name of the author
|
||||
*
|
||||
* @return the display name of the author
|
||||
* @deprecated Use {@link #getDisplayName()} instead
|
||||
*/
|
||||
@Deprecated
|
||||
public @NotNull String getSender() {
|
||||
return getAuthor().getAuthoredName();
|
||||
}
|
||||
|
||||
/**
|
||||
* The name of the author
|
||||
* Will return the display name if mcMMO chat config is set to, otherwise returns the players Mojang registered nickname
|
||||
* @return the author's name
|
||||
*/
|
||||
public @NotNull String getDisplayName() {
|
||||
return getAuthor().getAuthoredName();
|
||||
public @NotNull String getDisplayName(ChatChannel chatChannel) {
|
||||
return getAuthor().getAuthoredName(chatChannel);
|
||||
}
|
||||
|
||||
/**
|
||||
@ -115,14 +106,6 @@ public abstract class McMMOChatEvent extends Event implements Cancellable {
|
||||
this.chatMessage.setChatMessage(chatMessage);
|
||||
}
|
||||
|
||||
/**
|
||||
* Does not function anymore
|
||||
*/
|
||||
@Deprecated
|
||||
public void setDisplayName(@NotNull String displayName) {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param message Adjusts the final message sent to players in the party
|
||||
*
|
||||
|
Reference in New Issue
Block a user