Apply initial requested changes

This commit is contained in:
Camotoy
2021-02-09 14:13:33 -05:00
parent d47b339908
commit fb879cb498
2 changed files with 20 additions and 8 deletions

View File

@@ -2,6 +2,7 @@ package com.velocitypowered.api.event.player;
import com.google.common.base.Preconditions;
import com.velocitypowered.api.proxy.Player;
import com.velocitypowered.api.proxy.messages.ChannelIdentifier;
import java.util.List;
@@ -9,12 +10,12 @@ import java.util.List;
* This event is fired when a client ({@link Player}) sends a plugin message through the
* register channel.
*/
public final class PlayerPluginMessageRegisterEvent {
public final class PlayerChannelRegisterEvent {
private final Player player;
private final List<String> channels;
private final List<ChannelIdentifier> channels;
public PlayerPluginMessageRegisterEvent(Player player, List<String> channels) {
public PlayerChannelRegisterEvent(Player player, List<ChannelIdentifier> channels) {
this.player = Preconditions.checkNotNull(player, "player");
this.channels = Preconditions.checkNotNull(channels, "channels");
}
@@ -23,13 +24,13 @@ public final class PlayerPluginMessageRegisterEvent {
return player;
}
public List<String> getChannels() {
public List<ChannelIdentifier> getChannels() {
return channels;
}
@Override
public String toString() {
return "PlayerPluginMessageRegisterEvent{"
return "PlayerChannelRegisterEvent{"
+ "player=" + player
+ ", channels=" + channels
+ '}';