2014-12-02 06:02:15 +00:00
|
|
|
From 1a3cc56937c40ebe7fe5e3eb4e5651926df75895 Mon Sep 17 00:00:00 2001
|
2014-07-21 20:46:54 +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-12-02 06:02:15 +00:00
|
|
|
index b28ec72..5480607 100644
|
2014-07-21 20:46:54 +00:00
|
|
|
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
|
|
|
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
2014-12-02 06:02:15 +00:00
|
|
|
@@ -1060,6 +1060,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
2014-07-21 20:46:54 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
public void addChannel(String channel) {
|
2014-11-28 01:17:45 +00:00
|
|
|
+ com.google.common.base.Preconditions.checkState( channels.size() < 128, "Too many channels registered" ); // Spigot
|
2014-07-21 20:46:54 +00:00
|
|
|
if (channels.add(channel)) {
|
|
|
|
server.getPluginManager().callEvent(new PlayerRegisterChannelEvent(this, channel));
|
|
|
|
}
|
|
|
|
--
|
2014-11-28 01:17:45 +00:00
|
|
|
2.1.0
|
2014-07-21 20:46:54 +00:00
|
|
|
|