Mirror von
https://github.com/PaperMC/Paper.git
synchronisiert 2024-11-17 21:40:08 +01:00
1c49ff69f4
The hell happened here. : Fix Build 2339ac14a8e Regen the patches 89d3fcbdfaf This new system breaks a lot :(
22 Zeilen
909 B
Diff
22 Zeilen
909 B
Diff
From 86719075f68287a5c5ddeb0482c6bc96ed06f6c1 Mon Sep 17 00:00:00 2001
|
|
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
|
|
index 0836137..75061e6 100644
|
|
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
|
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
|
@@ -1059,6 +1059,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
|
}
|
|
|
|
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));
|
|
}
|
|
--
|
|
2.1.0
|
|
|