Mirror von
https://github.com/ViaVersion/ViaVersion.git
synchronisiert 2024-12-27 08:30:09 +01:00
Add warning on startup for 1.8 users
Dieser Commit ist enthalten in:
Ursprung
03ba058a9b
Commit
0015682fe4
@ -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();
|
||||||
|
@ -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
|
||||||
|
@ -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
|
||||||
*
|
*
|
||||||
|
@ -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;
|
||||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren