diff options
Diffstat (limited to 'CraftBukkit-Patches/0099-Cap-Channel-Registrations.patch')
-rw-r--r-- | CraftBukkit-Patches/0099-Cap-Channel-Registrations.patch | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/CraftBukkit-Patches/0099-Cap-Channel-Registrations.patch b/CraftBukkit-Patches/0099-Cap-Channel-Registrations.patch new file mode 100644 index 0000000000..98d5fe9dff --- /dev/null +++ b/CraftBukkit-Patches/0099-Cap-Channel-Registrations.patch @@ -0,0 +1,21 @@ +From 6a59c9e9712c8dd542a3a577535a3092268d8868 Mon Sep 17 00:00:00 2001 +From: md_5 <[email protected]> +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 0c4153f..625e6f3 100644 +--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java ++++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +@@ -1056,6 +1056,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 + |