diff --git a/bukkit/src/main/java/us/myles/ViaVersion/ViaVersionPlugin.java b/bukkit/src/main/java/us/myles/ViaVersion/ViaVersionPlugin.java index 1ee6b90e0..2f2a01e69 100644 --- a/bukkit/src/main/java/us/myles/ViaVersion/ViaVersionPlugin.java +++ b/bukkit/src/main/java/us/myles/ViaVersion/ViaVersionPlugin.java @@ -11,8 +11,8 @@ import us.myles.ViaVersion.api.ViaAPI; import us.myles.ViaVersion.api.command.ViaCommandSender; import us.myles.ViaVersion.api.configuration.ConfigurationProvider; import us.myles.ViaVersion.api.data.MappingDataLoader; -import us.myles.ViaVersion.api.data.UserConnection; import us.myles.ViaVersion.api.platform.TaskId; +import us.myles.ViaVersion.api.platform.ViaConnectionManager; import us.myles.ViaVersion.api.platform.ViaPlatform; import us.myles.ViaVersion.bukkit.classgenerator.ClassGenerator; import us.myles.ViaVersion.bukkit.commands.BukkitCommandHandler; @@ -20,18 +20,13 @@ import us.myles.ViaVersion.bukkit.commands.BukkitCommandSender; import us.myles.ViaVersion.bukkit.platform.*; import us.myles.ViaVersion.bukkit.util.NMSUtil; import us.myles.ViaVersion.dump.PluginInfo; -import us.myles.ViaVersion.protocols.base.ProtocolInfo; import us.myles.ViaVersion.util.GsonUtil; import java.util.*; -import java.util.concurrent.ConcurrentHashMap; public class ViaVersionPlugin extends JavaPlugin implements ViaPlatform { - private static ViaVersionPlugin instance; - - private final Map clients = new ConcurrentHashMap<>(); - private final Set connections = Collections.newSetFromMap(new ConcurrentHashMap<>()); + private final ViaConnectionManager connectionManager = new ViaConnectionManager(); private final BukkitCommandHandler commandHandler; private final BukkitViaConfig conf; private final ViaAPI api = new BukkitViaAPI(this); @@ -285,33 +280,7 @@ public class ViaVersionPlugin extends JavaPlugin implements ViaPlatform } @Override - public void onLoginSuccess(UserConnection connection) { - Objects.requireNonNull(connection, "connection is null!"); - UUID id = connection.get(ProtocolInfo.class).getUuid(); - connections.add(connection); - clients.put(id, connection); - } - - @Override - public void onDisconnect(UserConnection connection) { - Objects.requireNonNull(connection, "connection is null!"); - UUID id = connection.get(ProtocolInfo.class).getUuid(); - connections.remove(connection); - clients.remove(id); - } - - @Override - public Map getConnectedClients() { - return Collections.unmodifiableMap(clients); - } - - @Override - public UserConnection getConnectedClient(UUID clientIdentifier) { - return clients.get(clientIdentifier); - } - - @Override - public Set getConnections() { - return Collections.unmodifiableSet(connections); + public ViaConnectionManager getConnectionManager() { + return connectionManager; } } diff --git a/bukkit/src/main/java/us/myles/ViaVersion/bukkit/platform/BukkitViaAPI.java b/bukkit/src/main/java/us/myles/ViaVersion/bukkit/platform/BukkitViaAPI.java index cf88538a5..969328234 100644 --- a/bukkit/src/main/java/us/myles/ViaVersion/bukkit/platform/BukkitViaAPI.java +++ b/bukkit/src/main/java/us/myles/ViaVersion/bukkit/platform/BukkitViaAPI.java @@ -71,12 +71,12 @@ public class BukkitViaAPI implements ViaAPI { } @Override - public BossBar createBossBar(String title, BossColor color, BossStyle style) { + public BossBar createBossBar(String title, BossColor color, BossStyle style) { return new ViaBossBar(title, 1F, color, style); } @Override - public BossBar createBossBar(String title, float health, BossColor color, BossStyle style) { + public BossBar createBossBar(String title, float health, BossColor color, BossStyle style) { return new ViaBossBar(title, health, color, style); } @@ -107,7 +107,7 @@ public class BukkitViaAPI implements ViaAPI { return plugin.isProtocolSupport(); } - public Map getPortedPlayers() { + private Map getPortedPlayers() { return Via.getManager().getConnectedClients(); } } diff --git a/bungee/pom.xml b/bungee/pom.xml index ac539806b..8a5625485 100644 --- a/bungee/pom.xml +++ b/bungee/pom.xml @@ -29,7 +29,7 @@ net.md-5 bungeecord-api - 1.13-SNAPSHOT + 1.15-SNAPSHOT provided diff --git a/bungee/src/main/java/us/myles/ViaVersion/BungeePlugin.java b/bungee/src/main/java/us/myles/ViaVersion/BungeePlugin.java index cbaf8fe27..ea5bd0b5f 100644 --- a/bungee/src/main/java/us/myles/ViaVersion/BungeePlugin.java +++ b/bungee/src/main/java/us/myles/ViaVersion/BungeePlugin.java @@ -2,6 +2,7 @@ package us.myles.ViaVersion; import com.google.gson.JsonObject; import net.md_5.bungee.api.ProxyServer; +import net.md_5.bungee.api.chat.TextComponent; import net.md_5.bungee.api.connection.ProxiedPlayer; import net.md_5.bungee.api.event.PlayerDisconnectEvent; import net.md_5.bungee.api.plugin.Listener; @@ -15,6 +16,7 @@ import us.myles.ViaVersion.api.configuration.ConfigurationProvider; import us.myles.ViaVersion.api.data.MappingDataLoader; import us.myles.ViaVersion.api.data.UserConnection; import us.myles.ViaVersion.api.platform.TaskId; +import us.myles.ViaVersion.api.platform.ViaConnectionManager; import us.myles.ViaVersion.api.platform.ViaPlatform; import us.myles.ViaVersion.bungee.commands.BungeeCommand; import us.myles.ViaVersion.bungee.commands.BungeeCommandHandler; @@ -22,19 +24,15 @@ import us.myles.ViaVersion.bungee.commands.BungeeCommandSender; import us.myles.ViaVersion.bungee.platform.*; import us.myles.ViaVersion.bungee.service.ProtocolDetectorService; import us.myles.ViaVersion.dump.PluginInfo; -import us.myles.ViaVersion.protocols.base.ProtocolInfo; import us.myles.ViaVersion.util.GsonUtil; import java.util.*; -import java.util.concurrent.ConcurrentHashMap; import java.util.concurrent.TimeUnit; -public class BungeePlugin extends Plugin implements ViaPlatform, Listener { - private final Map clients = new ConcurrentHashMap<>(); - private final Set connections = Collections.newSetFromMap(new ConcurrentHashMap<>()); +public class BungeePlugin extends Plugin implements ViaPlatform, Listener { private BungeeViaAPI api; private BungeeViaConfig config; - private BungeeCommandHandler commandHandler; + private final ViaConnectionManager connectionManager = new ViaConnectionManager(); @Override public void onLoad() { @@ -52,7 +50,7 @@ public class BungeePlugin extends Plugin implements ViaPlatform, Listener { api = new BungeeViaAPI(); config = new BungeeViaConfig(getDataFolder()); - commandHandler = new BungeeCommandHandler(); + BungeeCommandHandler commandHandler = new BungeeCommandHandler(); ProxyServer.getInstance().getPluginManager().registerCommand(this, new BungeeCommand(commandHandler)); // Init platform @@ -130,13 +128,13 @@ public class BungeePlugin extends Plugin implements ViaPlatform, Listener { @Override public void sendMessage(UUID uuid, String message) { - getProxy().getPlayer(uuid).sendMessage(message); + getProxy().getPlayer(uuid).sendMessage(TextComponent.fromLegacyText(message)); } @Override public boolean kickPlayer(UUID uuid, String message) { if (getProxy().getPlayer(uuid) != null) { - getProxy().getPlayer(uuid).disconnect(message); + getProxy().getPlayer(uuid).disconnect(TextComponent.fromLegacyText(message)); return true; } return false; @@ -148,7 +146,7 @@ public class BungeePlugin extends Plugin implements ViaPlatform, Listener { } @Override - public ViaAPI getApi() { + public ViaAPI getApi() { return api; } @@ -173,7 +171,13 @@ public class BungeePlugin extends Plugin implements ViaPlatform, Listener { List plugins = new ArrayList<>(); for (Plugin p : ProxyServer.getInstance().getPluginManager().getPlugins()) - plugins.add(new PluginInfo(true, p.getDescription().getName(), p.getDescription().getVersion(), p.getDescription().getMain(), Arrays.asList(p.getDescription().getAuthor()))); + plugins.add(new PluginInfo( + true, + p.getDescription().getName(), + p.getDescription().getVersion(), + p.getDescription().getMain(), + Collections.singletonList(p.getDescription().getAuthor()) + )); platformSpecific.add("plugins", GsonUtil.getGson().toJsonTree(plugins)); platformSpecific.add("servers", GsonUtil.getGson().toJsonTree(ProtocolDetectorService.getDetectedIds())); @@ -186,39 +190,13 @@ public class BungeePlugin extends Plugin implements ViaPlatform, Listener { } @Override - public void onLoginSuccess(UserConnection connection) { - Objects.requireNonNull(connection, "connection is null!"); - UUID id = connection.get(ProtocolInfo.class).getUuid(); - connections.add(connection); - clients.put(id, connection); - } - - @Override - public void onDisconnect(UserConnection connection) { - Objects.requireNonNull(connection, "connection is null!"); - UUID id = connection.get(ProtocolInfo.class).getUuid(); - connections.remove(connection); - clients.remove(id); - } - - @Override - public Map getConnectedClients() { - return Collections.unmodifiableMap(clients); - } - - @Override - public UserConnection getConnectedClient(UUID clientIdentifier) { - return clients.get(clientIdentifier); - } - - @Override - public Set getConnections() { - return Collections.unmodifiableSet(connections); + public ViaConnectionManager getConnectionManager() { + return connectionManager; } @EventHandler public void onQuit(PlayerDisconnectEvent e) { - UserConnection userConnection = getConnectedClient(e.getPlayer().getUniqueId()); + UserConnection userConnection = getConnectionManager().getConnectedClient(e.getPlayer().getUniqueId()); if (userConnection != null) { // Only remove if the connection is disconnected (eg. relogin) if (userConnection.getChannel() == null || !userConnection.getChannel().isOpen()) { diff --git a/bungee/src/main/java/us/myles/ViaVersion/bungee/platform/BungeeViaAPI.java b/bungee/src/main/java/us/myles/ViaVersion/bungee/platform/BungeeViaAPI.java index 3ace9afec..0fd57fd60 100644 --- a/bungee/src/main/java/us/myles/ViaVersion/bungee/platform/BungeeViaAPI.java +++ b/bungee/src/main/java/us/myles/ViaVersion/bungee/platform/BungeeViaAPI.java @@ -78,7 +78,7 @@ public class BungeeViaAPI implements ViaAPI { return outputSet; } - public Map getPortedPlayers() { + private Map getPortedPlayers() { return Via.getManager().getConnectedClients(); } diff --git a/common/src/main/java/us/myles/ViaVersion/ViaManager.java b/common/src/main/java/us/myles/ViaVersion/ViaManager.java index 2b971521b..bf4d489b8 100644 --- a/common/src/main/java/us/myles/ViaVersion/ViaManager.java +++ b/common/src/main/java/us/myles/ViaVersion/ViaManager.java @@ -111,7 +111,7 @@ public class ViaManager { } public Set getConnections() { - return platform.getConnections(); + return platform.getConnectionManager().getConnections(); } /** @@ -123,11 +123,11 @@ public class ViaManager { } public Map getConnectedClients() { - return platform.getConnectedClients(); + return platform.getConnectionManager().getConnectedClients(); } public void handleLoginSuccess(UserConnection info) { - platform.onLoginSuccess(info); + platform.getConnectionManager().onLoginSuccess(info); } public void handleDisconnect(UUID id) { @@ -135,7 +135,7 @@ public class ViaManager { } public void handleDisconnect(UserConnection info) { - platform.onDisconnect(info); + platform.getConnectionManager().onDisconnect(info); } public ViaPlatform getPlatform() { @@ -167,6 +167,6 @@ public class ViaManager { } public UserConnection getConnection(UUID playerUUID) { - return platform.getConnectedClient(playerUUID); + return platform.getConnectionManager().getConnectedClient(playerUUID); } } diff --git a/common/src/main/java/us/myles/ViaVersion/api/platform/ViaConnectionManager.java b/common/src/main/java/us/myles/ViaVersion/api/platform/ViaConnectionManager.java new file mode 100644 index 000000000..4fa7fbd09 --- /dev/null +++ b/common/src/main/java/us/myles/ViaVersion/api/platform/ViaConnectionManager.java @@ -0,0 +1,54 @@ +package us.myles.ViaVersion.api.platform; + +import us.myles.ViaVersion.api.data.UserConnection; +import us.myles.ViaVersion.protocols.base.ProtocolInfo; + +import java.util.*; +import java.util.concurrent.ConcurrentHashMap; + +/** + * Handles UserConnections + */ +public class ViaConnectionManager { + protected final Map clients = new ConcurrentHashMap<>(); + protected final Set connections = Collections.newSetFromMap(new ConcurrentHashMap<>()); + + public void onLoginSuccess(UserConnection connection) { + Objects.requireNonNull(connection, "connection is null!"); + UUID id = connection.get(ProtocolInfo.class).getUuid(); + connections.add(connection); + clients.put(id, connection); + } + + public void onDisconnect(UserConnection connection) { + Objects.requireNonNull(connection, "connection is null!"); + UUID id = connection.get(ProtocolInfo.class).getUuid(); + connections.remove(connection); + clients.remove(id); + } + + /** + * Returns a map containing the UUIDs and frontend UserConnections from players connected to this proxy server + * Returns empty list when there isn't a server + */ + public Map getConnectedClients() { + return Collections.unmodifiableMap(clients); + } + + /** + * Returns the frontend UserConnection from the player connected to this proxy server + * Returns null when there isn't a server or connection was not found + */ + public UserConnection getConnectedClient(UUID clientIdentifier) { + return clients.get(clientIdentifier); + } + + /** + * Returns all UserConnections which are active + * May contain duplicated UUIDs on multiple ProtocolInfo. + * May contain frontend, backend and/or client-sided connections. + */ + public Set getConnections() { + return Collections.unmodifiableSet(connections); + } +} diff --git a/common/src/main/java/us/myles/ViaVersion/api/platform/ViaPlatform.java b/common/src/main/java/us/myles/ViaVersion/api/platform/ViaPlatform.java index 24a04348e..4c04c71c4 100644 --- a/common/src/main/java/us/myles/ViaVersion/api/platform/ViaPlatform.java +++ b/common/src/main/java/us/myles/ViaVersion/api/platform/ViaPlatform.java @@ -5,11 +5,8 @@ import us.myles.ViaVersion.api.ViaAPI; import us.myles.ViaVersion.api.ViaVersionConfig; import us.myles.ViaVersion.api.command.ViaCommandSender; import us.myles.ViaVersion.api.configuration.ConfigurationProvider; -import us.myles.ViaVersion.api.data.UserConnection; import java.io.File; -import java.util.Map; -import java.util.Set; import java.util.UUID; import java.util.logging.Logger; @@ -170,17 +167,5 @@ public interface ViaPlatform { */ boolean isOldClientsAllowed(); - void onLoginSuccess(UserConnection connection); - - void onDisconnect(UserConnection connection); - - Map getConnectedClients(); - - UserConnection getConnectedClient(UUID clientIdentifier); - - /** - * May contain duplicated UUIDs on multiple ProtocolInfo. - * May contain client-sided connections. - */ - Set getConnections(); + ViaConnectionManager getConnectionManager(); } diff --git a/sponge/src/main/java/us/myles/ViaVersion/SpongePlugin.java b/sponge/src/main/java/us/myles/ViaVersion/SpongePlugin.java index 6fcd299cc..37e8674d8 100644 --- a/sponge/src/main/java/us/myles/ViaVersion/SpongePlugin.java +++ b/sponge/src/main/java/us/myles/ViaVersion/SpongePlugin.java @@ -2,7 +2,6 @@ package us.myles.ViaVersion; import com.google.gson.JsonObject; import com.google.inject.Inject; -import lombok.Getter; import net.md_5.bungee.api.chat.TextComponent; import net.md_5.bungee.chat.ComponentSerializer; import org.spongepowered.api.Game; @@ -20,11 +19,10 @@ import us.myles.ViaVersion.api.Via; import us.myles.ViaVersion.api.command.ViaCommandSender; import us.myles.ViaVersion.api.configuration.ConfigurationProvider; import us.myles.ViaVersion.api.data.MappingDataLoader; -import us.myles.ViaVersion.api.data.UserConnection; import us.myles.ViaVersion.api.platform.TaskId; +import us.myles.ViaVersion.api.platform.ViaConnectionManager; import us.myles.ViaVersion.api.platform.ViaPlatform; import us.myles.ViaVersion.dump.PluginInfo; -import us.myles.ViaVersion.protocols.base.ProtocolInfo; import us.myles.ViaVersion.sponge.VersionInfo; import us.myles.ViaVersion.sponge.commands.SpongeCommandHandler; import us.myles.ViaVersion.sponge.commands.SpongeCommandSender; @@ -34,7 +32,6 @@ import us.myles.ViaVersion.util.GsonUtil; import java.io.File; import java.util.*; -import java.util.concurrent.ConcurrentHashMap; import java.util.logging.Logger; @Plugin(id = "viaversion", @@ -44,25 +41,17 @@ import java.util.logging.Logger; description = "Allow newer Minecraft versions to connect to an older server version." ) public class SpongePlugin implements ViaPlatform { - private final Map clients = new ConcurrentHashMap<>(); - private final Set connections = Collections.newSetFromMap(new ConcurrentHashMap<>()); - @Inject private Game game; - @Inject private PluginContainer container; - @Inject @DefaultConfig(sharedRoot = true) private File spongeConfig; - @Getter - private SpongeViaAPI api = new SpongeViaAPI(); - @Getter + private final ViaConnectionManager connectionManager = new ViaConnectionManager(); + private final SpongeViaAPI api = new SpongeViaAPI(); private SpongeViaConfig conf; - - @Getter private Logger logger; @Listener @@ -190,7 +179,7 @@ public class SpongePlugin implements ViaPlatform { @Override public boolean kickPlayer(UUID uuid, String message) { return game.getServer().getPlayer(uuid).map(player -> { - player.kick(TextSerializers.LEGACY_FORMATTING_CODE.deserialize(message)); + player.kick(TextSerializers.formattingCode('ยง').deserialize(message)); return true; }).orElse(false); } @@ -239,35 +228,23 @@ public class SpongePlugin implements ViaPlatform { return true; } - @Override - public void onLoginSuccess(UserConnection connection) { - Objects.requireNonNull(connection, "connection is null!"); - UUID id = connection.get(ProtocolInfo.class).getUuid(); - connections.add(connection); - clients.put(id, connection); + public ViaConnectionManager getConnectionManager() { + return connectionManager; } @Override - public void onDisconnect(UserConnection connection) { - Objects.requireNonNull(connection, "connection is null!"); - UUID id = connection.get(ProtocolInfo.class).getUuid(); - connections.remove(connection); - clients.remove(id); + public SpongeViaAPI getApi() { + return api; } @Override - public Map getConnectedClients() { - return Collections.unmodifiableMap(clients); + public SpongeViaConfig getConf() { + return conf; } @Override - public UserConnection getConnectedClient(UUID clientIdentifier) { - return clients.get(clientIdentifier); - } - - @Override - public Set getConnections() { - return Collections.unmodifiableSet(connections); + public Logger getLogger() { + return logger; } } diff --git a/sponge/src/main/java/us/myles/ViaVersion/sponge/platform/SpongeViaAPI.java b/sponge/src/main/java/us/myles/ViaVersion/sponge/platform/SpongeViaAPI.java index 4f17fb37b..b75ae5dad 100644 --- a/sponge/src/main/java/us/myles/ViaVersion/sponge/platform/SpongeViaAPI.java +++ b/sponge/src/main/java/us/myles/ViaVersion/sponge/platform/SpongeViaAPI.java @@ -73,7 +73,7 @@ public class SpongeViaAPI implements ViaAPI { return outputSet; } - public Map getPortedPlayers() { + private Map getPortedPlayers() { return Via.getManager().getConnectedClients(); } } diff --git a/velocity/src/main/java/us/myles/ViaVersion/VelocityPlugin.java b/velocity/src/main/java/us/myles/ViaVersion/VelocityPlugin.java index 05e3b5278..1637eecd1 100644 --- a/velocity/src/main/java/us/myles/ViaVersion/VelocityPlugin.java +++ b/velocity/src/main/java/us/myles/ViaVersion/VelocityPlugin.java @@ -10,7 +10,6 @@ import com.velocitypowered.api.plugin.PluginContainer; import com.velocitypowered.api.plugin.annotation.DataDirectory; import com.velocitypowered.api.proxy.Player; import com.velocitypowered.api.proxy.ProxyServer; -import lombok.Getter; import net.kyori.text.serializer.gson.GsonComponentSerializer; import net.md_5.bungee.api.chat.TextComponent; import net.md_5.bungee.chat.ComponentSerializer; @@ -21,9 +20,9 @@ import us.myles.ViaVersion.api.configuration.ConfigurationProvider; import us.myles.ViaVersion.api.data.MappingDataLoader; import us.myles.ViaVersion.api.data.UserConnection; import us.myles.ViaVersion.api.platform.TaskId; +import us.myles.ViaVersion.api.platform.ViaConnectionManager; import us.myles.ViaVersion.api.platform.ViaPlatform; import us.myles.ViaVersion.dump.PluginInfo; -import us.myles.ViaVersion.protocols.base.ProtocolInfo; import us.myles.ViaVersion.util.GsonUtil; import us.myles.ViaVersion.velocity.VersionInfo; import us.myles.ViaVersion.velocity.command.VelocityCommandHandler; @@ -35,7 +34,6 @@ import us.myles.ViaVersion.velocity.util.LoggerWrapper; import java.io.File; import java.nio.file.Path; import java.util.*; -import java.util.concurrent.ConcurrentHashMap; import java.util.concurrent.TimeUnit; @Plugin( @@ -47,23 +45,20 @@ import java.util.concurrent.TimeUnit; url = "https://viaversion.com" ) public class VelocityPlugin implements ViaPlatform { - private final Map clients = new ConcurrentHashMap<>(); - private final Set connections = Collections.newSetFromMap(new ConcurrentHashMap<>()); + public static ProxyServer PROXY; + @Inject private ProxyServer proxy; @Inject - public static ProxyServer PROXY; - @Inject private Logger loggerslf4j; - - private java.util.logging.Logger logger; @Inject @DataDirectory private Path configDir; private VelocityViaAPI api; - + private java.util.logging.Logger logger; private VelocityViaConfig conf; + private ViaConnectionManager connectionManager; @Subscribe public void onProxyInit(ProxyInitializeEvent e) { @@ -73,6 +68,7 @@ public class VelocityPlugin implements ViaPlatform { api = new VelocityViaAPI(); conf = new VelocityViaConfig(configDir.toFile()); logger = new LoggerWrapper(loggerslf4j); + connectionManager = new ViaConnectionManager(); Via.init(ViaManager.builder() .platform(this) .commandHandler(commandHandler) @@ -88,7 +84,7 @@ public class VelocityPlugin implements ViaPlatform { @Subscribe public void onQuit(DisconnectEvent e) { - UserConnection userConnection = getConnectedClient(e.getPlayer().getUniqueId()); + UserConnection userConnection = connectionManager.getConnectedClient(e.getPlayer().getUniqueId()); if (userConnection != null) { // Only remove if the connection is disconnected (eg. relogin) if (userConnection.getChannel() == null || !userConnection.getChannel().isOpen()) { @@ -236,33 +232,7 @@ public class VelocityPlugin implements ViaPlatform { } @Override - public void onLoginSuccess(UserConnection connection) { - Objects.requireNonNull(connection, "connection is null!"); - UUID id = connection.get(ProtocolInfo.class).getUuid(); - connections.add(connection); - clients.put(id, connection); - } - - @Override - public void onDisconnect(UserConnection connection) { - Objects.requireNonNull(connection, "connection is null!"); - UUID id = connection.get(ProtocolInfo.class).getUuid(); - connections.remove(connection); - clients.remove(id); - } - - @Override - public Map getConnectedClients() { - return Collections.unmodifiableMap(clients); - } - - @Override - public UserConnection getConnectedClient(UUID clientIdentifier) { - return clients.get(clientIdentifier); - } - - @Override - public Set getConnections() { - return Collections.unmodifiableSet(connections); + public ViaConnectionManager getConnectionManager() { + return connectionManager; } } diff --git a/velocity/src/main/java/us/myles/ViaVersion/velocity/platform/VelocityViaAPI.java b/velocity/src/main/java/us/myles/ViaVersion/velocity/platform/VelocityViaAPI.java index 00b2f1318..ad4223d8f 100644 --- a/velocity/src/main/java/us/myles/ViaVersion/velocity/platform/VelocityViaAPI.java +++ b/velocity/src/main/java/us/myles/ViaVersion/velocity/platform/VelocityViaAPI.java @@ -79,7 +79,7 @@ public class VelocityViaAPI implements ViaAPI { return outputSet; } - public Map getPortedPlayers() { + private Map getPortedPlayers() { return Via.getManager().getConnectedClients(); } }