Mirror von
https://github.com/IntellectualSites/FastAsyncWorldEdit.git
synchronisiert 2024-11-20 09:50:06 +01:00
Add special adapter load for folia
Dieser Commit ist enthalten in:
Ursprung
c840a9cc6a
Commit
a45887c9b4
@ -5,7 +5,9 @@ include("worldedit-libs")
|
||||
listOf("1_17_1", "1_18_2", "1_19_4", "1_20", "1_20_2").forEach {
|
||||
include("worldedit-bukkit:adapters:adapter-$it")
|
||||
}
|
||||
|
||||
listOf("1_19_4").forEach {
|
||||
include("worldedit-bukkit:folia-adapters:adapter-$it")
|
||||
}
|
||||
listOf("bukkit", "core", "cli").forEach {
|
||||
include("worldedit-libs:$it")
|
||||
include("worldedit-$it")
|
||||
|
@ -69,6 +69,9 @@ dependencies {
|
||||
project.project(":worldedit-bukkit:adapters").subprojects.forEach {
|
||||
"adapters"(project(it.path))
|
||||
}
|
||||
project.project(":worldedit-bukkit:folia-adapters").subprojects.forEach {
|
||||
"adapters"(project(it.path))
|
||||
}
|
||||
|
||||
// Minecraft expectations
|
||||
implementation(libs.fastutil)
|
||||
@ -142,6 +145,7 @@ addJarManifest(WorldEditKind.Plugin, includeClasspath = true)
|
||||
|
||||
tasks.named<ShadowJar>("shadowJar") {
|
||||
dependsOn(project.project(":worldedit-bukkit:adapters").subprojects.map { it.tasks.named("assemble") })
|
||||
dependsOn(project.project(":worldedit-bukkit:folia-adapters").subprojects.map { it.tasks.named("assemble") })
|
||||
from(Callable {
|
||||
adapters.resolve()
|
||||
.map { f ->
|
||||
|
@ -20,6 +20,7 @@
|
||||
package com.sk89q.worldedit.bukkit.adapter;
|
||||
|
||||
import com.fastasyncworldedit.bukkit.util.MinecraftVersion;
|
||||
import com.fastasyncworldedit.core.util.FoliaSupport;
|
||||
import com.sk89q.worldedit.internal.util.LogManagerCompat;
|
||||
import com.sk89q.worldedit.util.io.Closer;
|
||||
import org.apache.logging.log4j.Logger;
|
||||
@ -44,7 +45,7 @@ public class BukkitImplLoader {
|
||||
private int zeroth = 0;
|
||||
private String customCandidate;
|
||||
|
||||
private static final String SEARCH_PACKAGE = "com.sk89q.worldedit.bukkit.adapter.impl.fawe";
|
||||
private static String SEARCH_PACKAGE = "com.sk89q.worldedit.bukkit.adapter.impl.fawe";
|
||||
private static final String SEARCH_PACKAGE_DOT = SEARCH_PACKAGE + ".";
|
||||
private static final String SEARCH_PATH = SEARCH_PACKAGE.replace(".", "/");
|
||||
private static final String CLASS_SUFFIX = ".class";
|
||||
@ -65,6 +66,9 @@ public class BukkitImplLoader {
|
||||
* Create a new instance.
|
||||
*/
|
||||
public BukkitImplLoader() {
|
||||
if (FoliaSupport.isFolia()) {
|
||||
SEARCH_PACKAGE = "com.sk89q.worldedit.folia.adapter.impl.fawe";
|
||||
}
|
||||
addDefaults();
|
||||
}
|
||||
|
||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren