[ci skip] Improve PlayerChatEvent Deprecation Message (#9956)

This commit is contained in:
Tamion 2023-11-22 05:46:51 +01:00 committed by GitHub
parent 250388defe
commit eda3d537d6
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -3210,14 +3210,20 @@ index 9866c07c999f46cb585709804aaad710c3031d5a..c7c45e2de8cca1bf8b8e12752e08db62
/** /**
diff --git a/src/main/java/org/bukkit/event/player/PlayerChatEvent.java b/src/main/java/org/bukkit/event/player/PlayerChatEvent.java diff --git a/src/main/java/org/bukkit/event/player/PlayerChatEvent.java b/src/main/java/org/bukkit/event/player/PlayerChatEvent.java
index a1f4261eaa1497554f1e51d1d5a072c2eb9226df..3a1da86e3dbf18c6e1040086c1df4b8976bc2b9d 100644 index a1f4261eaa1497554f1e51d1d5a072c2eb9226df..2c021bc2ff18f0b3af5feb9dafc8ccebd604f8b5 100644
--- a/src/main/java/org/bukkit/event/player/PlayerChatEvent.java --- a/src/main/java/org/bukkit/event/player/PlayerChatEvent.java
+++ b/src/main/java/org/bukkit/event/player/PlayerChatEvent.java +++ b/src/main/java/org/bukkit/event/player/PlayerChatEvent.java
@@ -18,6 +18,7 @@ import org.jetbrains.annotations.NotNull; @@ -12,12 +12,7 @@ import org.jetbrains.annotations.NotNull;
* Listening to this event forces chat to wait for the main thread which /**
* causes delays for chat. {@link AsyncPlayerChatEvent} is the encouraged * Holds information for player chat and commands
* alternative for thread safe implementations. *
+ * @deprecated use {@link io.papermc.paper.event.player.ChatEvent} instead - * @deprecated This event will fire from the main thread and allows the use of
- * all of the Bukkit API, unlike the {@link AsyncPlayerChatEvent}.
- * <p>
- * Listening to this event forces chat to wait for the main thread which
- * causes delays for chat. {@link AsyncPlayerChatEvent} is the encouraged
- * alternative for thread safe implementations.
+ * @deprecated Listening to this event forces chat to wait for the main thread, delaying chat messages. It is recommended to use {@link io.papermc.paper.event.player.AsyncChatEvent} instead, wherever possible.
*/ */
@Deprecated @Deprecated
@Warning(reason = "Listening to this event forces chat to wait for the main thread, delaying chat messages.") @Warning(reason = "Listening to this event forces chat to wait for the main thread, delaying chat messages.")