From 9912527e1b90db40ea53844785f3ce8d832d046c Mon Sep 17 00:00:00 2001 From: md_5 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 index 5011579..27d3715 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java @@ -1052,6 +1052,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)); } -- 1.9.1