2014-08-18 17:43:17 +02:00
|
|
|
From 93205306b35b628668d46294d38f9f005900a880 Mon Sep 17 00:00:00 2001
|
2014-07-21 22:46:54 +02: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-08-18 17:43:17 +02:00
|
|
|
index 5011579..27d3715 100644
|
2014-07-21 22:46:54 +02:00
|
|
|
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
|
|
|
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
2014-08-18 17:43:17 +02:00
|
|
|
@@ -1052,6 +1052,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
2014-07-21 22:46:54 +02: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));
|
|
|
|
}
|
|
|
|
--
|
|
|
|
1.9.1
|
|
|
|
|