From 5dabc4e42ebf6f94db8fd1e340b92709bb6ea2ca Mon Sep 17 00:00:00 2001 From: Prototik Date: Wed, 1 Jul 2015 00:53:50 +0700 Subject: [PATCH] Spigot's 0098-Cap-Channel-Registrations.patch (close #82) --- src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java | 1 + 1 file changed, 1 insertion(+) diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java index 5b3e16a..dc6d2b6 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java @@ -1059,6 +1059,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player { } public void addChannel(String channel) { + 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)); }