3
0
Mirror von https://github.com/PaperMC/Velocity.git synchronisiert 2024-09-29 14:40:21 +02:00

Add getBoundAddress() for NuVotifier

Dieser Commit ist enthalten in:
Andrew Steinborn 2018-09-02 16:34:25 -04:00
Ursprung 3791283860
Commit ff0f83b375
2 geänderte Dateien mit 14 neuen und 0 gelöschten Zeilen

Datei anzeigen

@ -8,6 +8,7 @@ import com.velocitypowered.api.proxy.messages.ChannelRegistrar;
import com.velocitypowered.api.scheduler.Scheduler; import com.velocitypowered.api.scheduler.Scheduler;
import com.velocitypowered.api.proxy.server.ServerInfo; import com.velocitypowered.api.proxy.server.ServerInfo;
import java.net.InetSocketAddress;
import java.util.Collection; import java.util.Collection;
import java.util.Optional; import java.util.Optional;
import java.util.UUID; import java.util.UUID;
@ -107,4 +108,11 @@ public interface ProxyServer {
* @return the channel registrar * @return the channel registrar
*/ */
ChannelRegistrar getChannelRegistrar(); ChannelRegistrar getChannelRegistrar();
/**
* Gets the address that this proxy is bound to. This does not necessarily indicate the external IP address of the
* proxy.
* @return the address the proxy is bound to
*/
InetSocketAddress getBoundAddress();
} }

Datei anzeigen

@ -39,6 +39,7 @@ import net.kyori.text.serializer.GsonComponentSerializer;
import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger; import org.apache.logging.log4j.Logger;
import java.net.InetSocketAddress;
import java.nio.file.Files; import java.nio.file.Files;
import java.nio.file.Path; import java.nio.file.Path;
import java.nio.file.Paths; import java.nio.file.Paths;
@ -306,4 +307,9 @@ public class VelocityServer implements ProxyServer {
public VelocityChannelRegistrar getChannelRegistrar() { public VelocityChannelRegistrar getChannelRegistrar() {
return channelRegistrar; return channelRegistrar;
} }
@Override
public InetSocketAddress getBoundAddress() {
return configuration.getBind();
}
} }