2014-04-03 22:12:44 +02:00
|
|
|
From 89786f9d45d487551d3fce889b99928c86d5189e Mon Sep 17 00:00:00 2001
|
2014-02-12 10:03:12 +01: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-04-03 22:12:44 +02:00
|
|
|
index 024cf9c..3010245 100644
|
2014-02-12 10:03:12 +01:00
|
|
|
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
|
|
|
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
2014-04-03 22:12:44 +02:00
|
|
|
@@ -1046,6 +1046,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
2014-02-12 10:03:12 +01: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-04-03 22:12:44 +02:00
|
|
|
1.8.5.2.msysgit.0
|
2014-02-12 10:03:12 +01:00
|
|
|
|