mirror of
https://github.com/GeyserMC/Geyser.git
synced 2024-08-14 23:57:35 +00:00
Clean up a bunch
Mostly checked with IntelliJ, but manually performed. The only issue I possibly anticipate is item name/lore issues, but the new method should be technically better.
This commit is contained in:
parent
683ac1c763
commit
3a2cff7864
43 changed files with 125 additions and 190 deletions
|
|
@ -32,17 +32,16 @@ import org.geysermc.connector.common.serializer.AsteriskSerializer;
|
|||
import org.geysermc.connector.dump.BootstrapDumpInfo;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
|
||||
@Getter
|
||||
public class GeyserBungeeDumpInfo extends BootstrapDumpInfo {
|
||||
|
||||
private String platformName;
|
||||
private String platformVersion;
|
||||
private boolean onlineMode;
|
||||
private List<ListenerInfo> listeners;
|
||||
private List<PluginInfo> plugins;
|
||||
private final String platformName;
|
||||
private final String platformVersion;
|
||||
private final boolean onlineMode;
|
||||
private final List<ListenerInfo> listeners;
|
||||
private final List<PluginInfo> plugins;
|
||||
|
||||
GeyserBungeeDumpInfo(ProxyServer proxy) {
|
||||
super();
|
||||
|
|
@ -63,7 +62,7 @@ public class GeyserBungeeDumpInfo extends BootstrapDumpInfo {
|
|||
}
|
||||
|
||||
for (Plugin plugin : proxy.getPluginManager().getPlugins()) {
|
||||
this.plugins.add(new PluginInfo(true, plugin.getDescription().getName(), plugin.getDescription().getVersion(), plugin.getDescription().getMain(), Arrays.asList(plugin.getDescription().getAuthor())));
|
||||
this.plugins.add(new PluginInfo(true, plugin.getDescription().getName(), plugin.getDescription().getVersion(), plugin.getDescription().getMain(), Collections.singletonList(plugin.getDescription().getAuthor())));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -37,7 +37,6 @@ import net.md_5.bungee.protocol.ProtocolConstants;
|
|||
import org.geysermc.connector.common.ping.GeyserPingInfo;
|
||||
import org.geysermc.connector.ping.IGeyserPingPassthrough;
|
||||
|
||||
import java.net.Inet4Address;
|
||||
import java.net.InetSocketAddress;
|
||||
import java.net.SocketAddress;
|
||||
import java.util.Arrays;
|
||||
|
|
@ -64,9 +63,8 @@ public class GeyserBungeePingPassthrough implements IGeyserPingPassthrough, List
|
|||
new GeyserPingInfo.Version(response.getVersion().getName(), response.getVersion().getProtocol())
|
||||
);
|
||||
if (event.getResponse().getPlayers().getSample() != null) {
|
||||
Arrays.stream(event.getResponse().getPlayers().getSample()).forEach(proxiedPlayer -> {
|
||||
geyserPingInfo.getPlayerList().add(proxiedPlayer.getName());
|
||||
});
|
||||
Arrays.stream(event.getResponse().getPlayers().getSample()).forEach(proxiedPlayer ->
|
||||
geyserPingInfo.getPlayerList().add(proxiedPlayer.getName()));
|
||||
}
|
||||
return geyserPingInfo;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue