From 464d7c85bdd3c0b03ad7cd685723a75335577128 Mon Sep 17 00:00:00 2001 From: Chaoscaot Date: Sun, 3 Aug 2025 22:10:15 +0200 Subject: [PATCH] Update version handling for Minecraft 1.21.5: Adjust `TypeUtils` and `ServerStarter` to support `PAPER_21`. --- VelocityCore/src/de/steamwar/command/TypeUtils.java | 4 +++- VelocityCore/src/de/steamwar/velocitycore/ServerStarter.java | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/VelocityCore/src/de/steamwar/command/TypeUtils.java b/VelocityCore/src/de/steamwar/command/TypeUtils.java index a273cda2..db22ec99 100644 --- a/VelocityCore/src/de/steamwar/command/TypeUtils.java +++ b/VelocityCore/src/de/steamwar/command/TypeUtils.java @@ -46,7 +46,9 @@ public class TypeUtils { Player player = sender.getPlayer(); if (player != null && s.isEmpty()) { ProtocolVersion version = player.getProtocolVersion(); - if (version.greaterThan(ProtocolVersion.MINECRAFT_1_19_4)) { + if (version.greaterThan(ProtocolVersion.MINECRAFT_1_20_5)) { + return ServerVersion.PAPER_21; + } else if (version.greaterThan(ProtocolVersion.MINECRAFT_1_19_4)) { return ServerVersion.PAPER_20; } else if (version.greaterThan(ProtocolVersion.MINECRAFT_1_15_2)) { return ServerVersion.PAPER_19; diff --git a/VelocityCore/src/de/steamwar/velocitycore/ServerStarter.java b/VelocityCore/src/de/steamwar/velocitycore/ServerStarter.java index 058771e7..db199b97 100644 --- a/VelocityCore/src/de/steamwar/velocitycore/ServerStarter.java +++ b/VelocityCore/src/de/steamwar/velocitycore/ServerStarter.java @@ -61,7 +61,7 @@ public class ServerStarter { private String worldDir = null; private Node node = null; - private ServerVersion version = ServerVersion.PAPER_20; + private ServerVersion version = ServerVersion.PAPER_21; private Portrange portrange = BAU_PORTS; private Function serverNameProvider = port -> node.getName() + port; private BooleanSupplier startCondition = () -> true;