mirror of
https://github.com/ViaVersion/ViaBackwards.git
synced 2025-01-02 18:48:06 +01:00
4.6.1 Release
This commit is contained in:
parent
11e71b1307
commit
efded25594
@ -5,7 +5,7 @@ plugins {
|
|||||||
|
|
||||||
allprojects {
|
allprojects {
|
||||||
group = "com.viaversion"
|
group = "com.viaversion"
|
||||||
version = "4.6.1-SNAPSHOT"
|
version = "4.6.1"
|
||||||
description = "Allow older clients to join newer server versions."
|
description = "Allow older clients to join newer server versions."
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -25,7 +25,6 @@ import com.viaversion.viabackwards.listener.LecternInteractListener;
|
|||||||
import com.viaversion.viabackwards.listener.PlayerItemDropListener;
|
import com.viaversion.viabackwards.listener.PlayerItemDropListener;
|
||||||
import com.viaversion.viaversion.api.Via;
|
import com.viaversion.viaversion.api.Via;
|
||||||
import com.viaversion.viaversion.api.protocol.version.ProtocolVersion;
|
import com.viaversion.viaversion.api.protocol.version.ProtocolVersion;
|
||||||
import com.viaversion.viaversion.bukkit.platform.BukkitViaLoader;
|
|
||||||
import org.bukkit.plugin.java.JavaPlugin;
|
import org.bukkit.plugin.java.JavaPlugin;
|
||||||
|
|
||||||
public class BukkitPlugin extends JavaPlugin implements ViaBackwardsPlatform {
|
public class BukkitPlugin extends JavaPlugin implements ViaBackwardsPlatform {
|
||||||
@ -45,19 +44,18 @@ public class BukkitPlugin extends JavaPlugin implements ViaBackwardsPlatform {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private void enable() {
|
private void enable() {
|
||||||
BukkitViaLoader loader = (BukkitViaLoader) Via.getManager().getLoader();
|
|
||||||
int protocolVersion = Via.getAPI().getServerVersion().highestSupportedVersion();
|
int protocolVersion = Via.getAPI().getServerVersion().highestSupportedVersion();
|
||||||
if (protocolVersion >= ProtocolVersion.v1_17.getVersion()) {
|
if (protocolVersion >= ProtocolVersion.v1_17.getVersion()) {
|
||||||
loader.storeListener(new PlayerItemDropListener(this)).register();
|
new PlayerItemDropListener(this).register();
|
||||||
}
|
}
|
||||||
if (protocolVersion >= ProtocolVersion.v1_16.getVersion()) {
|
if (protocolVersion >= ProtocolVersion.v1_16.getVersion()) {
|
||||||
loader.storeListener(new FireExtinguishListener(this)).register();
|
new FireExtinguishListener(this).register();
|
||||||
}
|
}
|
||||||
if (protocolVersion >= ProtocolVersion.v1_14.getVersion()) {
|
if (protocolVersion >= ProtocolVersion.v1_14.getVersion()) {
|
||||||
loader.storeListener(new LecternInteractListener(this)).register();
|
new LecternInteractListener(this).register();
|
||||||
}
|
}
|
||||||
if (protocolVersion >= ProtocolVersion.v1_12.getVersion()) {
|
if (protocolVersion >= ProtocolVersion.v1_12.getVersion()) {
|
||||||
loader.storeListener(new FireDamageListener(this)).register();
|
new FireDamageListener(this).register();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user