From ff7b9b03805ae54af82135d66dea75b4e6761343 Mon Sep 17 00:00:00 2001 From: EpicPlayerA10 <62206933+EpicPlayerA10@users.noreply.github.com> Date: Mon, 25 Dec 2023 12:01:18 +0100 Subject: [PATCH] Increase default custom payload channel size limit (#10006) --- ...180-Set-true-custom-payload-channel-size-limit.patch} | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) rename patches/api/{0180-Increase-custom-payload-channel-message-size.patch => 0180-Set-true-custom-payload-channel-size-limit.patch} (64%) diff --git a/patches/api/0180-Increase-custom-payload-channel-message-size.patch b/patches/api/0180-Set-true-custom-payload-channel-size-limit.patch similarity index 64% rename from patches/api/0180-Increase-custom-payload-channel-message-size.patch rename to patches/api/0180-Set-true-custom-payload-channel-size-limit.patch index 24aacd2b29..c524e2aaa0 100644 --- a/patches/api/0180-Increase-custom-payload-channel-message-size.patch +++ b/patches/api/0180-Set-true-custom-payload-channel-size-limit.patch @@ -1,13 +1,12 @@ From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 From: Shane Freeder Date: Fri, 18 Oct 2019 17:39:05 +0100 -Subject: [PATCH] Increase custom payload channel message size +Subject: [PATCH] Set true custom payload channel size limit -Doubles the custom payload size limit imposed by bukkit, also creates a system -property to allow customizing the size `paper.maxCustomChannelName` +This fixes compatibility with some mods that are sending very long channel names. Also gives developers the ability to send longer channel names. diff --git a/src/main/java/org/bukkit/plugin/messaging/Messenger.java b/src/main/java/org/bukkit/plugin/messaging/Messenger.java -index 9d2c68c826f3b867d407e7f13c6394a899cc8ee8..682c77188436d696d4dafbc70cf131d5c921e94d 100644 +index 9d2c68c826f3b867d407e7f13c6394a899cc8ee8..aec70aa740152c34297c42ad6e06c8b54523e78b 100644 --- a/src/main/java/org/bukkit/plugin/messaging/Messenger.java +++ b/src/main/java/org/bukkit/plugin/messaging/Messenger.java @@ -24,7 +24,7 @@ public interface Messenger { @@ -15,7 +14,7 @@ index 9d2c68c826f3b867d407e7f13c6394a899cc8ee8..682c77188436d696d4dafbc70cf131d5 * Represents the largest size that a Plugin Channel may be. */ - public static final int MAX_CHANNEL_SIZE = 64; -+ public static final int MAX_CHANNEL_SIZE = Integer.getInteger("paper.maxCustomChannelName", 64); // Paper ++ public static final int MAX_CHANNEL_SIZE = Integer.getInteger("paper.maxCustomChannelName", java.lang.Short.MAX_VALUE); // Paper - set true max channel size /** * Checks if the specified channel is a reserved name.