mirror of
https://github.com/PaperMC/Paper.git
synced 2026-11-05 09:20:18 -05:00
Cap Channel Registrations
This commit is contained in:
1 parent
a610dcd821
commit
b021230837
1 file changed
+1
@@ -1209,6 +1209,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
||||
}
|
||||
|
||||
public void addChannel(String channel) {
|
||||
Preconditions.checkState(channels.size() < 128, "Cannot register channel '%s'. Too many channels registered!", channel);
|
||||
channel = StandardMessenger.validateAndCorrectChannel(channel);
|
||||
if (channels.add(channel)) {
|
||||
server.getPluginManager().callEvent(new PlayerRegisterChannelEvent(this, channel));
|
||||
|
||||
Reference in new issue
Block a user