mirror of
https://github.com/plexusorg/Plex.git
synced 2025-07-12 16:08:35 +00:00
Fix libraries not working due to upstream issue
This commit is contained in:
@ -17,22 +17,22 @@ dependencies {
|
||||
library("org.projectlombok:lombok:1.18.38")
|
||||
library("org.json:json:20250107")
|
||||
library("commons-io:commons-io:2.19.0")
|
||||
library("redis.clients:jedis:6.0.0-beta2")
|
||||
library("org.mariadb.jdbc:mariadb-java-client:3.5.3")
|
||||
library("redis.clients:jedis:6.0.0")
|
||||
library("org.mariadb.jdbc:mariadb-java-client:3.5.4")
|
||||
library("com.zaxxer:HikariCP:6.3.0")
|
||||
library("org.apache.maven.resolver:maven-resolver-transport-http:1.9.22")
|
||||
library("org.apache.maven.resolver:maven-resolver-transport-http:1.9.24")
|
||||
library("org.jetbrains:annotations:26.0.2")
|
||||
compileOnly("io.papermc.paper:paper-api:1.21.4-R0.1-SNAPSHOT")
|
||||
compileOnly("io.papermc.paper:paper-api:1.21.7-R0.1-SNAPSHOT")
|
||||
compileOnly("com.github.MilkBowl:VaultAPI:1.7.1") {
|
||||
exclude("org.bukkit", "bukkit")
|
||||
}
|
||||
compileOnly("net.coreprotect:coreprotect:22.4")
|
||||
compileOnly("network.darkhelmet.prism:Prism-Api:1.0.0")
|
||||
compileOnly("com.github.LeonMangler:SuperVanish:6.2.19")
|
||||
|
||||
implementation("org.bstats:bstats-base:3.1.0")
|
||||
implementation("org.bstats:bstats-bukkit:3.1.0")
|
||||
|
||||
implementation("com.github.LeonMangler:SuperVanish:6.2.18-3")
|
||||
|
||||
annotationProcessor("org.projectlombok:lombok:1.18.38")
|
||||
}
|
||||
|
@ -4,6 +4,7 @@ import com.google.gson.Gson;
|
||||
import io.papermc.paper.plugin.loader.PluginClasspathBuilder;
|
||||
import io.papermc.paper.plugin.loader.PluginLoader;
|
||||
import io.papermc.paper.plugin.loader.library.impl.MavenLibraryResolver;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
import java.io.InputStreamReader;
|
||||
@ -11,6 +12,7 @@ import java.nio.charset.StandardCharsets;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.stream.Stream;
|
||||
|
||||
import org.eclipse.aether.artifact.DefaultArtifact;
|
||||
import org.eclipse.aether.graph.Dependency;
|
||||
import org.eclipse.aether.repository.RemoteRepository;
|
||||
@ -39,7 +41,12 @@ public class PlexLibraryManager implements PluginLoader
|
||||
{
|
||||
try (var in = getClass().getResourceAsStream("/paper-libraries.json"))
|
||||
{
|
||||
return new Gson().fromJson(new InputStreamReader(in, StandardCharsets.UTF_8), PluginLibraries.class);
|
||||
PluginLibraries libraries = new Gson().fromJson(new InputStreamReader(in, StandardCharsets.UTF_8), PluginLibraries.class);
|
||||
|
||||
// Patch the MavenRepo to use the default mirror
|
||||
libraries.repositories.put("MavenRepo", MavenLibraryResolver.MAVEN_CENTRAL_DEFAULT_MIRROR);
|
||||
|
||||
return libraries;
|
||||
}
|
||||
catch (IOException e)
|
||||
{
|
||||
@ -51,14 +58,12 @@ public class PlexLibraryManager implements PluginLoader
|
||||
{
|
||||
public Stream<Dependency> asDependencies()
|
||||
{
|
||||
return dependencies.stream()
|
||||
.map(d -> new Dependency(new DefaultArtifact(d), null));
|
||||
return dependencies.stream().map(d -> new Dependency(new DefaultArtifact(d), null));
|
||||
}
|
||||
|
||||
public Stream<RemoteRepository> asRepositories()
|
||||
{
|
||||
return repositories.entrySet().stream()
|
||||
.map(e -> new RemoteRepository.Builder(e.getKey(), "default", e.getValue()).build());
|
||||
return repositories.entrySet().stream().map(e -> new RemoteRepository.Builder(e.getKey(), "default", e.getValue()).build());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user