2014-03-09 21:37:28 +00:00
|
|
|
From 9d018764d904960b8709796fe2e62427f071b130 Mon Sep 17 00:00:00 2001
|
2014-02-12 09:03:12 +00:00
|
|
|
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
|
2014-02-12 13:48:26 +00:00
|
|
|
index db6e5b8..9b0672b 100644
|
2014-02-12 09:03:12 +00:00
|
|
|
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
|
|
|
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
2014-02-12 13:48:26 +00:00
|
|
|
@@ -1023,6 +1023,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
2014-02-12 09:03:12 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
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));
|
|
|
|
}
|
|
|
|
--
|
2014-03-09 21:37:28 +00:00
|
|
|
1.8.3.2
|
2014-02-12 09:03:12 +00:00
|
|
|
|