Przeglądaj źródła

Fixed messages not being sent to the action bar

nossr50 1 rok temu
rodzic
commit
0bf1bbe6ac

+ 1 - 0
Changelog.txt

@@ -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:

+ 11 - 12
pom.xml

@@ -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-key</include>
+                            <include>net.kyori:adventure-nbt</include>
                             <include>net.kyori:adventure-platform-api</include>
-                            <include>net.kyori:adventure-platform-viaversion</include>
+                            <include>net.kyori:adventure-platform-bukkit</include>
                             <include>net.kyori:adventure-platform-facet</include>
-                            <include>net.kyori:adventure-nbt</include>
-                            <include>net.kyori:adventure-key</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-platform-viaversion</include>
                             <include>net.kyori:adventure-text-serializer-bungeecord</include>
-                            <include>net.kyori:adventure-text-serializer-craftbukkit</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: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>

+ 4 - 5
src/main/java/com/gmail/nossr50/util/player/NotificationManager.java

@@ -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);
             }