Skip to content

Commit

Permalink
Cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
KaspianDev committed Dec 22, 2022
1 parent c0f6c19 commit 1be7bc6
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 11 deletions.
4 changes: 2 additions & 2 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
17 changes: 8 additions & 9 deletions src/main/java/com/github/kaspiandev/antipopup/AntiPopup.java
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
}

Expand Down

0 comments on commit 1be7bc6

Please sign in to comment.