Fix compilation

This commit is contained in:
Nassim Jahnke 2024-02-14 18:15:41 +01:00
parent c112044b5a
commit 96d6c0697e
No known key found for this signature in database
GPG Key ID: EF6771C01F6EF02F
2 changed files with 5 additions and 5 deletions

View File

@ -46,16 +46,16 @@ public class BukkitPlugin extends JavaPlugin implements ViaBackwardsPlatform {
private void enable() {
ProtocolVersion protocolVersion = Via.getAPI().getServerVersion().highestSupportedProtocolVersion();
if (protocolVersion.higherThanOrEquals(ProtocolVersion.v1_17)) {
if (protocolVersion.newerThanOrEquals(ProtocolVersion.v1_17)) {
new PlayerItemDropListener(this).register();
}
if (protocolVersion.higherThanOrEquals(ProtocolVersion.v1_16)) {
if (protocolVersion.newerThanOrEquals(ProtocolVersion.v1_16)) {
new FireExtinguishListener(this).register();
}
if (protocolVersion.higherThanOrEquals(ProtocolVersion.v1_14)) {
if (protocolVersion.newerThanOrEquals(ProtocolVersion.v1_14)) {
new LecternInteractListener(this).register();
}
if (protocolVersion.higherThanOrEquals(ProtocolVersion.v1_12)) {
if (protocolVersion.newerThanOrEquals(ProtocolVersion.v1_12)) {
new FireDamageListener(this).register();
}
}

View File

@ -93,7 +93,7 @@ public interface ViaBackwardsPlatform {
getLogger().info("Registering protocols...");
final ProtocolManager protocolManager = Via.getManager().getProtocolManager();
protocolManager.registerProtocol(new Protocol1_9To1_9_1(), ProtocolVersion.v1_9, ProtocolVersion.v1_9_1);
protocolManager.registerProtocol(new Protocol1_9_1_2To1_9_3_4(), Arrays.asList(ProtocolVersion.v1_9_1.getVersion(), ProtocolVersion.v1_9_2.getVersion()), ProtocolVersion.v1_9_3.getVersion());
protocolManager.registerProtocol(new Protocol1_9_1_2To1_9_3_4(), Arrays.asList(ProtocolVersion.v1_9_1, ProtocolVersion.v1_9_2), ProtocolVersion.v1_9_3);
protocolManager.registerProtocol(new Protocol1_9_4To1_10(), ProtocolVersion.v1_9_3, ProtocolVersion.v1_10);
protocolManager.registerProtocol(new Protocol1_10To1_11(), ProtocolVersion.v1_10, ProtocolVersion.v1_11);