Update VV usage

This commit is contained in:
KennyTV 2021-03-26 12:52:55 +01:00
parent 4c7919fe82
commit 9dcd95b2c3
No known key found for this signature in database
GPG Key ID: 6BE3B555EBC5982B

View File

@ -37,13 +37,14 @@ public class BukkitPlugin extends JavaPlugin implements ViaBackwardsPlatform {
private void onServerLoaded() {
BukkitViaLoader loader = (BukkitViaLoader) Via.getManager().getLoader();
if (Via.getAPI().getServerVersion() >= ProtocolVersion.v1_16.getVersion()) {
int protocolVersion = Via.getAPI().getServerVersion().highestSupportedVersion();
if (protocolVersion >= ProtocolVersion.v1_16.getVersion()) {
loader.storeListener(new FireExtinguishListener(this)).register();
}
if (Via.getAPI().getServerVersion() >= ProtocolVersion.v1_14.getVersion()) {
if (protocolVersion >= ProtocolVersion.v1_14.getVersion()) {
loader.storeListener(new LecternInteractListener(this)).register();
}
if (Via.getAPI().getServerVersion() >= ProtocolVersion.v1_12.getVersion()) {
if (protocolVersion >= ProtocolVersion.v1_12.getVersion()) {
loader.storeListener(new FireDamageListener(this)).register();
}
}