Mirror von
https://github.com/ViaVersion/ViaVersion.git
synchronisiert 2024-11-19 14:30:16 +01:00
Update Folia check
Dieser Commit ist enthalten in:
Ursprung
d08f15c095
Commit
c46bb5bcf5
@ -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);
|
||||||
}
|
}
|
||||||
|
@ -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
|
||||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren