aboutsummaryrefslogtreecommitdiffhomepage
path: root/Spigot-API-Patches/0183-Increase-custom-payload-channel-message-size.patch
blob: 24aacd2b2970efefe5a4086f9bc2cf98e1e4ccaf (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
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] Increase custom payload channel message size

Doubles the custom payload size limit imposed by bukkit, also creates a system
property to allow customizing the size `paper.maxCustomChannelName`

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
--- 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", 64); // Paper
 
     /**
      * Checks if the specified channel is a reserved name.