Update Folia check

This commit is contained in:
Nassim Jahnke 2023-03-25 00:31:50 +01:00
parent d08f15c095
commit c46bb5bcf5
No known key found for this signature in database
GPG Key ID: 6BE3B555EBC5982B
2 changed files with 4 additions and 4 deletions

View File

@ -55,7 +55,7 @@ import org.bukkit.plugin.Plugin;
import org.bukkit.plugin.java.JavaPlugin; import org.bukkit.plugin.java.JavaPlugin;
public class ViaVersionPlugin extends JavaPlugin implements ViaPlatform<Player> { public class ViaVersionPlugin extends JavaPlugin implements ViaPlatform<Player> {
private static final boolean FOLIA = PaperViaInjector.hasClass("io.papermc.paper.threadedregions.RegionisedServer"); private static final boolean FOLIA = PaperViaInjector.hasClass("io.papermc.paper.threadedregions.RegionizedServer");
private static ViaVersionPlugin instance; private static ViaVersionPlugin instance;
private final BukkitCommandHandler commandHandler; private final BukkitCommandHandler commandHandler;
private final BukkitViaConfig conf; private final BukkitViaConfig conf;
@ -109,11 +109,11 @@ public class ViaVersionPlugin extends JavaPlugin implements ViaPlatform<Player>
} }
if (FOLIA) { if (FOLIA) {
// Use Folia's RegionisedServerInitEvent to run code after the server has loaded // Use Folia's RegionizedServerInitEvent to run code after the server has loaded
final Class<? extends Event> serverInitEventClass; final Class<? extends Event> serverInitEventClass;
try { try {
//noinspection unchecked //noinspection unchecked
serverInitEventClass = (Class<? extends Event>) Class.forName("io.papermc.paper.threadedregions.RegionisedServerInitEvent"); serverInitEventClass = (Class<? extends Event>) Class.forName("io.papermc.paper.threadedregions.RegionizedServerInitEvent");
} catch (final ReflectiveOperationException e) { } catch (final ReflectiveOperationException e) {
throw new RuntimeException(e); throw new RuntimeException(e);
} }

View File

@ -1,5 +1,5 @@
# Project properties - we put these here so they can be modified without causing a recompile of the build scripts # Project properties - we put these here so they can be modified without causing a recompile of the build scripts
projectVersion=4.6.2 projectVersion=4.6.3-SNAPSHOT
# Gradle properties # Gradle properties
org.gradle.daemon=true org.gradle.daemon=true