Fixed messages not being sent to the action bar

This commit is contained in:
nossr50 2024-05-11 15:48:11 -07:00
parent b3edca5304
commit 0bf1bbe6ac
3 changed files with 18 additions and 19 deletions

View File

@ -1,6 +1,7 @@
Version 2.2.008
Fixed alchemy potions not upgrading correctly (This will only affect new potions made, see notes)
Fixed a bug where alchemy potions had italicized names
Fixed a bug where messages were not being sent to the action bar in 1.20.6
Fixed some exceptions that could happen with parties disabled (thanks IAISI)
NOTES:

27
pom.xml
View File

@ -140,23 +140,22 @@
<include>org.bstats:bstats-base</include>
<include>org.bstats:bstats-bukkit</include>
<include>net.kyori:adventure-api</include>
<include>net.kyori:adventure-text-serializer-gson</include>
<include>net.kyori:adventure-platform-bukkit</include>
<include>net.kyori:adventure-platform-api</include>
<include>net.kyori:adventure-platform-viaversion</include>
<include>net.kyori:adventure-platform-facet</include>
<include>net.kyori:adventure-nbt</include>
<include>net.kyori:adventure-key</include>
<include>net.kyori:adventure-nbt</include>
<include>net.kyori:adventure-platform-api</include>
<include>net.kyori:adventure-platform-bukkit</include>
<include>net.kyori:adventure-platform-facet</include>
<include>net.kyori:adventure-platform-viaversion</include>
<include>net.kyori:adventure-text-serializer-bungeecord</include>
<include>net.kyori:adventure-text-serializer-gson</include>
<include>net.kyori:adventure-text-serializer-gson-legacy-impl</include>
<include>net.kyori:adventure-text-serializer-json</include>
<include>net.kyori:adventure-text-serializer-json-legacy-impl</include>
<include>net.kyori:adventure-text-serializer-legacy</include>
<include>net.kyori:examination-api</include>
<include>net.kyori:examination-string</include>
<include>net.kyori:adventure-text-serializer-legacy</include>
<include>net.kyori:adventure-text-serializer-gson</include>
<include>net.kyori:adventure-text-serializer-json</include>
<include>net.kyori:adventure-text-serializer-bungeecord</include>
<include>net.kyori:adventure-text-serializer-craftbukkit</include>
<include>net.kyori:adventure-text-serializer-gson-legacy-impl</include>
<include>net.kyori:adventure-text-serializer-json-legacy-impl</include>
<include>net.kyori:option</include>
<include>net.kyori:adventure-text-serializer-craftbukkit</include>
<include>co.aikar:acf-bukkit</include>
<include>com.tcoded:FoliaLib</include>
</includes>
@ -344,7 +343,7 @@
<dependency>
<groupId>net.kyori</groupId>
<artifactId>adventure-platform-bukkit</artifactId>
<version>4.3.2</version>
<version>LATEST</version>
</dependency>
<dependency>
<groupId>net.kyori</groupId>

View File

@ -121,14 +121,13 @@ public class NotificationManager {
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
Component notificationTextComponent = customEvent.getNotificationTextComponent();
if(customEvent.getChatMessageType() == McMMOMessageType.ACTION_BAR)
{
if(customEvent.getChatMessageType() == McMMOMessageType.ACTION_BAR) {
audience.sendActionBar(notificationTextComponent);
if(customEvent.isMessageAlsoBeingSentToChat())
{
// If the message is being sent to the action bar we need to check if a copy is also sent to the chat system
if(customEvent.isMessageAlsoBeingSentToChat()) {
//Send copy to chat system
audience.sendMessage(notificationTextComponent);
}