Skip to content

Commit

Permalink
fix minimessage
Browse files Browse the repository at this point in the history
  • Loading branch information
sub-kek committed Mar 6, 2024
1 parent 5866d4b commit ea523d0
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions src/main/java/io/github/subkek/customdiscs/event/JukeBox.java
Original file line number Diff line number Diff line change
Expand Up @@ -62,9 +62,7 @@ public void onInsert(PlayerInteractEvent event) throws IOException {
Component songNameComponent = Objects.requireNonNull(event.getItem().getItemMeta().lore()).get(0).asComponent();
String songName = PlainTextComponentSerializer.plainText().serialize(songNameComponent);

TextComponent customActionBarSongPlaying = Component.text()
.content(Formatter.format(plugin.language.get("now-playing"), songName))
.build();
Component customActionBarSongPlaying = miniMessage.deserialize(Formatter.format(plugin.language.get("now-playing"), songName));

assert VoicePlugin.voicechatServerApi != null;
playerManager.playLocationalAudio(VoicePlugin.voicechatServerApi, soundFilePath, block, customActionBarSongPlaying.asComponent());
Expand All @@ -88,9 +86,7 @@ public void onInsert(PlayerInteractEvent event) throws IOException {
Component songNameComponent = Objects.requireNonNull(event.getItem().getItemMeta().lore()).get(0).asComponent();
String songName = PlainTextComponentSerializer.plainText().serialize(songNameComponent);

TextComponent customActionBarSongPlaying = Component.text()
.content(Formatter.format(plugin.language.get("now-playing"), songName))
.build();
Component customActionBarSongPlaying = miniMessage.deserialize(Formatter.format(plugin.language.get("now-playing"), songName));

assert VoicePlugin.voicechatServerApi != null;
YouTubePlayerManager.instance(block).playLocationalAudioYoutube(VoicePlugin.voicechatServerApi, soundLink, customActionBarSongPlaying);
Expand Down

0 comments on commit ea523d0

Please sign in to comment.