mirror of
https://github.com/PaperMC/Paper.git
synced 2025-01-24 01:06:01 +01:00
Cap Channel Registrations
By: md_5 <git@md-5.net>
This commit is contained in:
parent
fe7c2ee97f
commit
3eede450ed
1 changed files with 1 additions and 0 deletions
|
@ -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));
|
||||
|
|
Loading…
Add table
Reference in a new issue