3
0
Mirror von https://github.com/PaperMC/Paper.git synchronisiert 2024-11-14 20:10:05 +01:00
Paper/patches/api/0173-Set-true-custom-payload-channel-size-limit.patch

21 Zeilen
1.1 KiB
Diff

2021-06-11 14:02:28 +02:00
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Shane Freeder <theboyetronic@gmail.com>
Date: Fri, 18 Oct 2019 17:39:05 +0100
Subject: [PATCH] Set true custom payload channel size limit
2021-06-11 14:02:28 +02:00
This fixes compatibility with some mods that are sending very long channel names. Also gives developers the ability to send longer channel names.
2021-06-11 14:02:28 +02:00
diff --git a/src/main/java/org/bukkit/plugin/messaging/Messenger.java b/src/main/java/org/bukkit/plugin/messaging/Messenger.java
2024-10-22 18:23:19 +02:00
index c748a94523c8bc2140e1842ed7d8d462b52507d5..754fac6b2a45399efa34b06c6aa61f88c19e3d2b 100644
2021-06-11 14:02:28 +02:00
--- 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
2021-06-11 14:02:28 +02:00
/**
* Checks if the specified channel is a reserved name.