From c675c36601d30cec281ac38a755ac159f6ed3256 Mon Sep 17 00:00:00 2001 From: nossr50 Date: Wed, 30 Sep 2020 11:34:01 -0700 Subject: [PATCH] adventure api update --- .../java/com/gmail/nossr50/util/TextComponentFactory.java | 6 +++--- .../com/gmail/nossr50/util/player/NotificationManager.java | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/main/java/com/gmail/nossr50/util/TextComponentFactory.java b/src/main/java/com/gmail/nossr50/util/TextComponentFactory.java index d9f24b675..3a7fbed73 100644 --- a/src/main/java/com/gmail/nossr50/util/TextComponentFactory.java +++ b/src/main/java/com/gmail/nossr50/util/TextComponentFactory.java @@ -78,7 +78,7 @@ public class TextComponentFactory { wikiLinkComponent.hoverEvent(HoverEvent.showText(componentBuilder.build())); - mcMMO.getAudiences().audience(player).sendMessage(wikiLinkComponent, MessageType.SYSTEM); + mcMMO.getAudiences().player(player).sendMessage(wikiLinkComponent, MessageType.SYSTEM); } public static void sendPlayerUrlHeader(Player player) { @@ -89,7 +89,7 @@ public class TextComponentFactory { TextComponent emptySpace = TextComponent.space(); - mcMMO.getAudiences().audience(player).sendMessage(TextComponent.ofChildren( + mcMMO.getAudiences().player(player).sendMessage(TextComponent.ofChildren( prefix, getWebLinkTextComponent(McMMOWebLinks.WEBSITE), emptySpace, @@ -113,7 +113,7 @@ public class TextComponentFactory { AtomicReference messageToSend = new AtomicReference<>(); int newLineCount = 0; //Hacky solution to wordwrap problems - final Audience audience = mcMMO.getAudiences().audience(player); + final Audience audience = mcMMO.getAudiences().player(player); for (Component textComponent : textComponents) { //Don't send more than 3 subskills per line to avoid MOST wordwrap problems if(newLineCount > 2) diff --git a/src/main/java/com/gmail/nossr50/util/player/NotificationManager.java b/src/main/java/com/gmail/nossr50/util/player/NotificationManager.java index b5a4ce499..cc169f623 100644 --- a/src/main/java/com/gmail/nossr50/util/player/NotificationManager.java +++ b/src/main/java/com/gmail/nossr50/util/player/NotificationManager.java @@ -105,7 +105,7 @@ public class NotificationManager { if (customEvent.isCancelled()) return; - final Audience audience = mcMMO.getAudiences().audience(player); + final Audience audience = mcMMO.getAudiences().player(player); //If the message is being sent to the action bar we need to check if the copy if a copy is sent to the chat system if(customEvent.getChatMessageType() == McMMOMessageType.ACTION_BAR) @@ -165,7 +165,7 @@ public class NotificationManager { return; //CHAT MESSAGE - mcMMO.getAudiences().audience(mcMMOPlayer.getPlayer()).sendMessage(TextComponentFactory.getSubSkillUnlockedNotificationComponents(mcMMOPlayer.getPlayer(), subSkillType)); + mcMMO.getAudiences().player(mcMMOPlayer.getPlayer()).sendMessage(TextComponentFactory.getSubSkillUnlockedNotificationComponents(mcMMOPlayer.getPlayer(), subSkillType)); //Unlock Sound Effect SoundManager.sendCategorizedSound(mcMMOPlayer.getPlayer(), mcMMOPlayer.getPlayer().getLocation(), SoundType.SKILL_UNLOCKED, SoundCategory.MASTER);