diff options
Diffstat (limited to 'patches/api/0173-Set-true-custom-payload-channel-size-limit.patch')
-rw-r--r-- | patches/api/0173-Set-true-custom-payload-channel-size-limit.patch | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/patches/api/0173-Set-true-custom-payload-channel-size-limit.patch b/patches/api/0173-Set-true-custom-payload-channel-size-limit.patch new file mode 100644 index 0000000000..c524e2aaa0 --- /dev/null +++ b/patches/api/0173-Set-true-custom-payload-channel-size-limit.patch @@ -0,0 +1,20 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: Shane Freeder <[email protected]> +Date: Fri, 18 Oct 2019 17:39:05 +0100 +Subject: [PATCH] Set true custom payload channel size limit + +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..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 { + /** + * 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", java.lang.Short.MAX_VALUE); // Paper - set true max channel size + + /** + * Checks if the specified channel is a reserved name. |