mirror of
https://github.com/Winds-Studio/Leaf.git
synced 2026-01-04 15:41:40 +00:00
Update 1.20.6 (#49)
* Update Leaf API patches to 1.20.5 * Updated Upstream (Purpur API) * Some server patches work * Update 1.20.6 * Some server patches work * Some some server patches work * 0oO0oO0oOo * iI1IiI1i|!il| * Updated Upstream (Gale/Purpur) * Server patches work * Updated Upstream (Gale)
This commit is contained in:
@@ -9,32 +9,24 @@ Add JVM flag `-DLeaf.library-download-repo=link` to choose library download repo
|
||||
e.g. `-DLeaf.library-download-repo=https://maven.aliyun.com/repository/public`
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/plugin/java/LibraryLoader.java b/src/main/java/org/bukkit/plugin/java/LibraryLoader.java
|
||||
index 78a6e7a31a81bc82d3e3687661e16c6d8ebc4617..d1052c9e8f64619170548336b25a62c863c5ee2b 100644
|
||||
index 72b20fa06b461d89f0eeff7b2fbbbe89bae0027c..1e8720e1bf492e2cf1a1638071514e62ac66391d 100644
|
||||
--- a/src/main/java/org/bukkit/plugin/java/LibraryLoader.java
|
||||
+++ b/src/main/java/org/bukkit/plugin/java/LibraryLoader.java
|
||||
@@ -6,7 +6,6 @@ import java.net.MalformedURLException;
|
||||
import java.net.URL;
|
||||
import java.net.URLClassLoader;
|
||||
import java.util.ArrayList;
|
||||
-import java.util.Arrays;
|
||||
import java.util.List;
|
||||
import java.util.logging.Level;
|
||||
import java.util.logging.Logger;
|
||||
@@ -46,6 +45,7 @@ public class LibraryLoader
|
||||
@@ -46,6 +46,7 @@ public class LibraryLoader
|
||||
private final RepositorySystem repository;
|
||||
private final DefaultRepositorySystemSession session;
|
||||
private final List<RemoteRepository> repositories;
|
||||
+ private final String REPO = System.getProperty("Leaf.library-download-repo") != null ? System.getProperty("Leaf.library-download-repo") : "https://repo.maven.apache.org/maven2"; // Leaf - Configurable maven repos
|
||||
+ private final String repositoryAddress = System.getProperty("Leaf.library-download-repo") != null ? System.getProperty("Leaf.library-download-repo") : "https://repo.maven.apache.org/maven2"; // Leaf - Configurable maven repos
|
||||
public static java.util.function.BiFunction<URL[], ClassLoader, URLClassLoader> LIBRARY_LOADER_FACTORY; // Paper - rewrite reflection in libraries
|
||||
public static java.util.function.Function<List<java.nio.file.Path>, List<java.nio.file.Path>> REMAPPER; // Paper - remap libraries
|
||||
|
||||
public LibraryLoader(@NotNull Logger logger)
|
||||
{
|
||||
@@ -72,7 +72,17 @@ public class LibraryLoader
|
||||
} );
|
||||
@@ -79,7 +80,17 @@ public class LibraryLoader
|
||||
session.setSystemProperties( System.getProperties() );
|
||||
session.setReadOnly();
|
||||
|
||||
- this.repositories = repository.newResolutionRepositories( session, Arrays.asList( new RemoteRepository.Builder( "central", "default", "https://repo.maven.apache.org/maven2" ).build() ) );
|
||||
+ // Leaf start - Configurable maven repos
|
||||
+ this.repositories = repository.newResolutionRepositories( session, List.of( new RemoteRepository.Builder( "central", "default", REPO ).build() ) );
|
||||
+ this.repositories = repository.newResolutionRepositories( session, List.of( new RemoteRepository.Builder( "central", "default", repositoryAddress ).build() ) );
|
||||
+ /* // Dreeam TODO
|
||||
+ this.repositories = repository.newResolutionRepositories(session, List.of(
|
||||
+ new RemoteRepository.Builder("central", "default", "https://repo.maven.apache.org/maven2").build(),
|
||||
@@ -43,7 +35,7 @@ index 78a6e7a31a81bc82d3e3687661e16c6d8ebc4617..d1052c9e8f64619170548336b25a62c8
|
||||
+ new RemoteRepository.Builder("huaweicloud", "default", "https://repo.huaweicloud.com/repository/maven/").build()
|
||||
+ ));
|
||||
+ */
|
||||
+ // Leaf end
|
||||
+ // Leaf end - Configurable maven repos
|
||||
}
|
||||
|
||||
@Nullable
|
||||
|
||||
Reference in New Issue
Block a user