2015-05-25 14:05:40 +02:00
|
|
|
From 3522fd55c5aae8cee3851fc5a114b3a8b77c409c 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
|
2015-05-09 22:23:26 +02:00
|
|
|
index 19008c4..912ac14 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-12-21 02:09:49 +01:00
|
|
|
@@ -1061,6 +1061,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
2014-07-21 22:46:54 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
public void addChannel(String channel) {
|
2014-11-28 02:17:45 +01:00
|
|
|
+ com.google.common.base.Preconditions.checkState( channels.size() < 128, "Too many channels registered" ); // Spigot
|
2014-07-21 22:46:54 +02:00
|
|
|
if (channels.add(channel)) {
|
|
|
|
server.getPluginManager().callEvent(new PlayerRegisterChannelEvent(this, channel));
|
|
|
|
}
|
|
|
|
--
|
2015-05-09 22:23:26 +02:00
|
|
|
2.1.4
|
2014-07-21 22:46:54 +02:00
|
|
|
|