Remove LegacyChannelIdentifier
- Change loggedPlayers collection from HashMap to HashSet
This commit is contained in:
parent
ea43ee4a46
commit
5221b66140
@ -7,15 +7,14 @@ import com.google.inject.Inject;
|
||||
import com.velocitypowered.api.event.Subscribe;
|
||||
import com.velocitypowered.api.event.proxy.ProxyInitializeEvent;
|
||||
import com.velocitypowered.api.proxy.ProxyServer;
|
||||
import com.velocitypowered.api.proxy.messages.LegacyChannelIdentifier;
|
||||
import com.velocitypowered.api.proxy.messages.MinecraftChannelIdentifier;
|
||||
import org.slf4j.Logger;
|
||||
|
||||
import de.leonhard.storage.Yaml;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
import java.util.HashSet;
|
||||
import java.util.Set;
|
||||
import java.util.UUID;
|
||||
|
||||
public class AuthMeVelocityPlugin {
|
||||
@ -23,7 +22,7 @@ public class AuthMeVelocityPlugin {
|
||||
private final Logger logger;
|
||||
private static Yaml config = new Yaml("config", "plugins/AuthmeVelocity");
|
||||
|
||||
protected static final List<UUID> loggedPlayers = Collections.synchronizedList(new ArrayList<>());
|
||||
protected static final Set<UUID> loggedPlayers = Collections.synchronizedSet(new HashSet<UUID>());
|
||||
|
||||
@Inject
|
||||
public AuthMeVelocityPlugin(ProxyServer server, Logger logger) {
|
||||
@ -34,7 +33,6 @@ public class AuthMeVelocityPlugin {
|
||||
@Subscribe
|
||||
public void onProxyInitialize(ProxyInitializeEvent event) {
|
||||
proxy.getChannelRegistrar().register(
|
||||
new LegacyChannelIdentifier("authmevelocity:main"),
|
||||
MinecraftChannelIdentifier.create("authmevelocity", "main"));
|
||||
proxy.getEventManager().register(this, new ProxyListener(proxy, logger));
|
||||
if(proxy.getPluginManager().getPlugin("fastlogin").isPresent()){
|
||||
|
Loading…
x
Reference in New Issue
Block a user