3
0

Spigot's 0098-Cap-Channel-Registrations.patch (close #82)

This commit is contained in:
Prototik 2015-07-01 00:53:50 +07:00
parent 6149fc0c35
commit 5dabc4e42e

View File

@ -1059,6 +1059,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
} }
public void addChannel(String channel) { public void addChannel(String channel) {
com.google.common.base.Preconditions.checkState( channels.size() < 128, "Too many channels registered" ); // Spigot
if (channels.add(channel)) { if (channels.add(channel)) {
server.getPluginManager().callEvent(new PlayerRegisterChannelEvent(this, channel)); server.getPluginManager().callEvent(new PlayerRegisterChannelEvent(this, channel));
} }