3
0
Mirror von https://github.com/ViaVersion/ViaVersion.git synchronisiert 2024-12-27 08:30:09 +01:00

Merge branch 'master' into dev

Dieser Commit ist enthalten in:
KennyTV 2020-10-12 10:18:50 +02:00
Commit 5eccc2e3cd
Es konnte kein GPG-Schlüssel zu dieser Signatur gefunden werden
GPG-Schlüssel-ID: 6BE3B555EBC5982B
4 geänderte Dateien mit 24 neuen und 1 gelöschten Zeilen

Datei anzeigen

@ -85,6 +85,11 @@ public class BungeePlugin extends Plugin implements ViaPlatform<ProxiedPlayer>,
return getProxy().getVersion(); return getProxy().getVersion();
} }
@Override
public boolean isProxy() {
return true;
}
@Override @Override
public String getPluginVersion() { public String getPluginVersion() {
return getDescription().getVersion(); return getDescription().getVersion();

Datei anzeigen

@ -97,6 +97,9 @@ public class ViaManager {
platform.getLogger().warning("If you need support for older versions you may need to use one or more ViaVersion addons too."); platform.getLogger().warning("If you need support for older versions you may need to use one or more ViaVersion addons too.");
platform.getLogger().warning("In that case please read the ViaVersion resource page carefully or use https://jo0001.github.io/ViaSetup"); platform.getLogger().warning("In that case please read the ViaVersion resource page carefully or use https://jo0001.github.io/ViaSetup");
platform.getLogger().warning("and if you're still unsure, feel free to join our Discord-Server for further assistance."); platform.getLogger().warning("and if you're still unsure, feel free to join our Discord-Server for further assistance.");
} else if (ProtocolRegistry.SERVER_PROTOCOL == ProtocolVersion.v1_8.getId() && !platform.isProxy()) {
platform.getLogger().warning("This version of Minecraft is over half a decade old and support for it will be fully dropped eventually. "
+ "Please upgrade to a newer version to avoid encountering bugs and stability issues that have long been fixed.");
} }
} }
// Load Listeners / Tasks // Load Listeners / Tasks

Datei anzeigen

@ -16,6 +16,7 @@ import java.util.logging.Logger;
* @param <T> - The player type for the platform, used for API related methods * @param <T> - The player type for the platform, used for API related methods
*/ */
public interface ViaPlatform<T> { public interface ViaPlatform<T> {
/** /**
* Get the logger for this platform * Get the logger for this platform
* *
@ -33,10 +34,19 @@ public interface ViaPlatform<T> {
/** /**
* Get the platform version * Get the platform version
* *
* @return Platforn version * @return Platform version
*/ */
String getPlatformVersion(); String getPlatformVersion();
/**
* Returns true if the server Via is running on is a proxy server.
*
* @return true if the platform is a proxy
*/
default boolean isProxy() {
return false;
}
/** /**
* Get the plugin version * Get the plugin version
* *

Datei anzeigen

@ -102,6 +102,11 @@ public class VelocityPlugin implements ViaPlatform<Player> {
return (version != null) ? version : "Unknown"; return (version != null) ? version : "Unknown";
} }
@Override
public boolean isProxy() {
return true;
}
@Override @Override
public String getPluginVersion() { public String getPluginVersion() {
return VersionInfo.VERSION; return VersionInfo.VERSION;