Skip to content

Commit a6f7348

Browse files
committed
Update deprecated Paper check
Fixes some functionality on Youer hybrid servers
1 parent 21f189f commit a6f7348

1 file changed

Lines changed: 8 additions & 2 deletions

File tree

src/main/java/com/laytonsmith/abstraction/bukkit/BukkitMCServer.java

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -72,9 +72,15 @@ public BukkitMCServer() {
7272
this.s = Bukkit.getServer();
7373
craftBukkitPackage = this.s.getClass().getPackage().getName();
7474
try {
75-
Class.forName("com.destroystokyo.paper.PaperConfig");
75+
Class.forName("io.papermc.paper.configuration.Configuration");
7676
this.isPaper = true;
77-
} catch (ClassNotFoundException e) {}
77+
} catch (ClassNotFoundException e) {
78+
// check for below 1.19
79+
try {
80+
Class.forName("com.destroystokyo.paper.PaperConfig");
81+
this.isPaper = true;
82+
} catch (ClassNotFoundException ignore) {}
83+
}
7884
}
7985

8086
public BukkitMCServer(Server server) {

0 commit comments

Comments
 (0)