3
0
Mirror von https://github.com/PaperMC/Paper.git synchronisiert 2024-11-16 04:50:05 +01:00
Paper/CraftBukkit-Patches/0086-Cap-Channel-Registrations.patch

22 Zeilen
909 B
Diff

2015-04-09 05:41:04 +02:00
From 9441ab38aa6f6dcf8a0d96652e204b12d5c0ee7a Mon Sep 17 00:00:00 2001
From: md_5 <git@md-5.net>
Date: Wed, 12 Feb 2014 20:02:58 +1100
Subject: [PATCH] Cap Channel Registrations
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
2015-04-09 05:18:56 +02:00
index 6224cde..306ac63 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
@@ -1061,6 +1061,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
}
public void addChannel(String channel) {
2014-11-28 02:17:45 +01:00
+ com.google.common.base.Preconditions.checkState( channels.size() < 128, "Too many channels registered" ); // Spigot
if (channels.add(channel)) {
server.getPluginManager().callEvent(new PlayerRegisterChannelEvent(this, channel));
}
--
2014-11-28 02:17:45 +01:00
2.1.0