diff --git a/patches/api/Add-Player-Client-Options-API.patch b/patches/api/Add-Player-Client-Options-API.patch index 7f3518c2aa..f7d3de95c7 100644 --- a/patches/api/Add-Player-Client-Options-API.patch +++ b/patches/api/Add-Player-Client-Options-API.patch @@ -44,6 +44,12 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 + FULL("full"), + SYSTEM("system"), + HIDDEN("hidden"), ++ /** ++ * @deprecated no longer used anymore since 1.15.2, the value fallback ++ * to the default value of the setting when unknown on the server. ++ * In this case {@link #FULL} will be returned. ++ */ ++ @Deprecated(since = "1.15.2", forRemoval = true) + UNKNOWN("unknown"); + + public static final Index NAMES = Index.create(ChatVisibility.class, chatVisibility -> chatVisibility.name); diff --git a/patches/server/Implement-Player-Client-Options-API.patch b/patches/server/Implement-Player-Client-Options-API.patch index 94cf30a03c..0616d0ff64 100644 --- a/patches/server/Implement-Player-Client-Options-API.patch +++ b/patches/server/Implement-Player-Client-Options-API.patch @@ -148,7 +148,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 + } else if (com.destroystokyo.paper.ClientOption.CHAT_COLORS_ENABLED == type) { + return type.getType().cast(this.getHandle().canChatInColor()); + } else if (com.destroystokyo.paper.ClientOption.CHAT_VISIBILITY == type) { -+ return type.getType().cast(this.getHandle().getChatVisibility() == null ? com.destroystokyo.paper.ClientOption.ChatVisibility.UNKNOWN : com.destroystokyo.paper.ClientOption.ChatVisibility.valueOf(this.getHandle().getChatVisibility().name())); ++ return type.getType().cast(com.destroystokyo.paper.ClientOption.ChatVisibility.valueOf(this.getHandle().getChatVisibility().name())); + } else if (com.destroystokyo.paper.ClientOption.LOCALE == type) { + return type.getType().cast(this.getLocale()); + } else if (com.destroystokyo.paper.ClientOption.MAIN_HAND == type) {