Changed PlayerAddedToTabEvent from record to normal class (#117)

This commit is contained in:
AlexDev_ 2023-11-09 12:04:42 +01:00 committed by GitHub
parent 938ce9e077
commit 3d3f3a3bfa
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -20,9 +20,53 @@
package net.william278.velocitab.api;
import net.william278.velocitab.player.TabPlayer;
import org.jetbrains.annotations.NotNull;
import java.util.List;
public record PlayerAddedToTabEvent(TabPlayer player, String group, List<String> groupServers) {
@SuppressWarnings("unused")
public class PlayerAddedToTabEvent {
private final TabPlayer player;
private final String group;
private final List<String> groupServers;
public PlayerAddedToTabEvent(@NotNull TabPlayer player, @NotNull String group, @NotNull List<String> groupServers) {
this.player = player;
this.group = group;
this.groupServers = groupServers;
}
@NotNull
public TabPlayer getTabPlayer() {
return this.player;
}
@NotNull
public String getGroup() {
return this.group;
}
@NotNull
public List<String> getGroupServers() {
return this.groupServers;
}
@NotNull
@Deprecated(forRemoval = true)
private TabPlayer player() {
return this.player;
}
@NotNull
@Deprecated(forRemoval = true)
private String group() {
return this.group;
}
@NotNull
@Deprecated(forRemoval = true)
private List<String> groupServers() {
return this.groupServers;
}
}