Mirror von
https://github.com/ViaVersion/ViaVersion.git
synchronisiert 2024-12-28 00:50:13 +01:00
Merge branch 'master' into dev
# Conflicts: # gradle.properties
Dieser Commit ist enthalten in:
Commit
ee75f19790
@ -63,6 +63,14 @@ public interface MetaType {
|
|||||||
return type;
|
return type;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String toString() {
|
||||||
|
return "MetaType{" +
|
||||||
|
"typeId=" + typeId +
|
||||||
|
", type=" + type +
|
||||||
|
'}';
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean equals(final Object o) {
|
public boolean equals(final Object o) {
|
||||||
if (this == o) return true;
|
if (this == o) return true;
|
||||||
|
@ -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);
|
||||||
}
|
}
|
||||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren