mirror of
https://github.com/GeyserMC/Geyser.git
synced 2024-08-14 23:57:35 +00:00
Error out gracefully when Velocity is outdated
This commit is contained in:
parent
0efd04dd87
commit
25289a3606
1 changed files with 10 additions and 0 deletions
|
@ -35,6 +35,7 @@ import com.velocitypowered.api.network.ListenerType;
|
|||
import com.velocitypowered.api.plugin.Plugin;
|
||||
import com.velocitypowered.api.proxy.ProxyServer;
|
||||
import lombok.Getter;
|
||||
import net.kyori.adventure.util.Codec;
|
||||
import org.geysermc.common.PlatformType;
|
||||
import org.geysermc.geyser.GeyserBootstrap;
|
||||
import org.geysermc.geyser.GeyserImpl;
|
||||
|
@ -83,6 +84,15 @@ public class GeyserVelocityPlugin implements GeyserBootstrap {
|
|||
|
||||
@Override
|
||||
public void onEnable() {
|
||||
try {
|
||||
Codec.class.getMethod("codec", Codec.Decoder.class, Codec.Encoder.class);
|
||||
} catch (NoSuchMethodException e) {
|
||||
// velocitypowered.com has a build that is very outdated
|
||||
logger.error("Please download Velocity from https://papermc.io/downloads#Velocity - the 'stable' Velocity version " +
|
||||
"that has likely been downloaded is very outdated and does not support 1.19.");
|
||||
return;
|
||||
}
|
||||
|
||||
GeyserLocale.init(this);
|
||||
|
||||
try {
|
||||
|
|
Loading…
Reference in a new issue