mirror of
https://github.com/plexusorg/Plex.git
synced 2024-12-23 01:27:37 +00:00
make chat listener not parse events
This commit is contained in:
parent
bc3893e2db
commit
2bc943b4c8
@ -10,6 +10,8 @@ import net.kyori.adventure.audience.Audience;
|
|||||||
import net.kyori.adventure.text.Component;
|
import net.kyori.adventure.text.Component;
|
||||||
import net.kyori.adventure.text.format.NamedTextColor;
|
import net.kyori.adventure.text.format.NamedTextColor;
|
||||||
import net.kyori.adventure.text.minimessage.MiniMessage;
|
import net.kyori.adventure.text.minimessage.MiniMessage;
|
||||||
|
import net.kyori.adventure.text.minimessage.tag.resolver.TagResolver;
|
||||||
|
import net.kyori.adventure.text.minimessage.tag.standard.StandardTags;
|
||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
import org.bukkit.event.EventHandler;
|
import org.bukkit.event.EventHandler;
|
||||||
import org.jetbrains.annotations.NotNull;
|
import org.jetbrains.annotations.NotNull;
|
||||||
@ -51,14 +53,14 @@ public class ChatListener extends PlexListener
|
|||||||
return Component.empty()
|
return Component.empty()
|
||||||
.append(prefix)
|
.append(prefix)
|
||||||
.append(Component.space())
|
.append(Component.space())
|
||||||
.append(MiniMessage.miniMessage().deserialize(plugin.config.getString("chat.name-color", "<white>"))).append(sourceDisplayName)
|
.append(MiniMessage.miniMessage().deserialize(plugin.config.getString("chat.name-color", "<white>") + MiniMessage.builder().tags(TagResolver.resolver(StandardTags.color(), StandardTags.rainbow(), StandardTags.decorations(), StandardTags.gradient(), StandardTags.transition())).build().serialize(sourceDisplayName)))
|
||||||
.append(Component.space())
|
.append(Component.space())
|
||||||
.append(Component.text("»").color(NamedTextColor.GRAY))
|
.append(Component.text("»").color(NamedTextColor.GRAY))
|
||||||
.append(Component.space())
|
.append(Component.space())
|
||||||
.append(message);
|
.append(message);
|
||||||
}
|
}
|
||||||
return Component.empty()
|
return Component.empty()
|
||||||
.append(MiniMessage.miniMessage().deserialize(plugin.config.getString("chat.name-color", "<white>"))).append(sourceDisplayName)
|
.append(MiniMessage.miniMessage().deserialize(plugin.config.getString("chat.name-color", "<white>") + MiniMessage.builder().tags(TagResolver.resolver(StandardTags.color(), StandardTags.rainbow(), StandardTags.decorations(), StandardTags.gradient(), StandardTags.transition())).build().serialize(sourceDisplayName)))
|
||||||
.append(Component.space())
|
.append(Component.space())
|
||||||
.append(Component.text("»").color(NamedTextColor.GRAY))
|
.append(Component.text("»").color(NamedTextColor.GRAY))
|
||||||
.append(Component.space())
|
.append(Component.space())
|
||||||
|
Loading…
Reference in New Issue
Block a user