diff --git a/build.gradle b/build.gradle index 9f20f2a..69f60e8 100644 --- a/build.gradle +++ b/build.gradle @@ -27,11 +27,11 @@ dependencies { compileOnly "org.spigotmc:spigot-api:1.19.2-R0.1-SNAPSHOT" compileOnly "dev.dejvokep:boosted-yaml-spigot:1.3" compileOnly "org.apache.commons:commons-configuration2:2.8.0" - compileOnly "com.viaversion:viaversion:4.5.0" + compileOnly "com.viaversion:viaversion:4.5.1" compileOnly "org.apache.logging.log4j:log4j-core:2.19.0" implementation "org.bstats:bstats-bukkit:3.0.0" - implementation "com.github.retrooper.packetevents:spigot:2.0.0-20221215.205426-101" + implementation "com.github.retrooper.packetevents:spigot:2.0.0-20221221.225809-103" } tasks { diff --git a/src/main/java/com/github/kaspiandev/antipopup/AntiPopup.java b/src/main/java/com/github/kaspiandev/antipopup/AntiPopup.java index 04393ad..d2d46dd 100644 --- a/src/main/java/com/github/kaspiandev/antipopup/AntiPopup.java +++ b/src/main/java/com/github/kaspiandev/antipopup/AntiPopup.java @@ -78,15 +78,14 @@ public void onEnable() { PacketEvents.getAPI().init(); getLogger().info("Initiated PacketEvents."); - if (yamlDoc.getBoolean("setup-mode")) { - if (PacketEvents.getAPI().getServerManager().getVersion().isNewerThan(ServerVersion.V_1_19_2)) { - yamlDoc.set("mode", "BUKKIT"); - yamlDoc.set("setup-mode", false); - try { - yamlDoc.save(); - } catch (IOException e) { - throw new RuntimeException(e); - } + if (yamlDoc.getBoolean("setup-mode") + && PacketEvents.getAPI().getServerManager().getVersion().isNewerThan(ServerVersion.V_1_19_2)) { + yamlDoc.set("mode", "BUKKIT"); + yamlDoc.set("setup-mode", false); + try { + yamlDoc.save(); + } catch (IOException e) { + throw new RuntimeException(e); } }