mirror of
https://github.com/PaperMC/Velocity.git
synced 2026-02-20 07:57:42 +01:00
A wild Velocity 5.0.0 appears!
This commit is contained in:
6
.github/workflows/gradle.yml
vendored
6
.github/workflows/gradle.yml
vendored
@@ -6,15 +6,15 @@ name: Java CI with Gradle
|
|||||||
on: [push, pull_request]
|
on: [push, pull_request]
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build-11:
|
build-17:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v3
|
||||||
- uses: gradle/wrapper-validation-action@v1
|
- uses: gradle/wrapper-validation-action@v1
|
||||||
- name: Set up JDK 11
|
- name: Set up JDK 17
|
||||||
uses: actions/setup-java@v3
|
uses: actions/setup-java@v3
|
||||||
with:
|
with:
|
||||||
java-version: 11
|
java-version: 17
|
||||||
distribution: 'temurin'
|
distribution: 'temurin'
|
||||||
- name: Grant execute permission for gradlew
|
- name: Grant execute permission for gradlew
|
||||||
run: chmod +x gradlew
|
run: chmod +x gradlew
|
||||||
|
|||||||
@@ -68,17 +68,12 @@ tasks {
|
|||||||
"https://www.slf4j.org/apidocs/",
|
"https://www.slf4j.org/apidocs/",
|
||||||
"https://guava.dev/releases/$guavaVersion/api/docs/",
|
"https://guava.dev/releases/$guavaVersion/api/docs/",
|
||||||
"https://google.github.io/guice/api-docs/$guiceVersion/javadoc/",
|
"https://google.github.io/guice/api-docs/$guiceVersion/javadoc/",
|
||||||
"https://docs.oracle.com/en/java/javase/11/docs/api/",
|
"https://docs.oracle.com/en/java/javase/17/docs/api/",
|
||||||
"https://jd.advntr.dev/api/$adventureVersion/",
|
"https://jd.advntr.dev/api/$adventureVersion/",
|
||||||
"https://javadoc.io/doc/com.github.ben-manes.caffeine/caffeine"
|
"https://javadoc.io/doc/com.github.ben-manes.caffeine/caffeine/3.1.5/"
|
||||||
)
|
)
|
||||||
|
|
||||||
// Disable the crazy super-strict doclint tool in Java 8
|
// Disable the crazy super-strict doclint tool in Java 8
|
||||||
o.addStringOption("Xdoclint:none", "-quiet")
|
o.addStringOption("Xdoclint:none", "-quiet")
|
||||||
|
|
||||||
// Remove "undefined" from search paths when generating javadoc for a non-modular project (JDK-8215291)
|
|
||||||
if (JavaVersion.current() >= JavaVersion.VERSION_1_9 && JavaVersion.current() < JavaVersion.VERSION_12) {
|
|
||||||
o.addBooleanOption("-no-module-directories", true)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -43,7 +43,7 @@ public interface CommandManager {
|
|||||||
* @param otherAliases additional aliases
|
* @param otherAliases additional aliases
|
||||||
* @throws IllegalArgumentException if one of the given aliases is already registered, or
|
* @throws IllegalArgumentException if one of the given aliases is already registered, or
|
||||||
* the given command does not implement a registrable {@link Command} subinterface
|
* the given command does not implement a registrable {@link Command} subinterface
|
||||||
* @see Command for a list of registrable {@link Command} subinterfaces
|
* @see Command for a list of registrable subinterfaces
|
||||||
*/
|
*/
|
||||||
default void register(String alias, Command command, String... otherAliases) {
|
default void register(String alias, Command command, String... otherAliases) {
|
||||||
register(metaBuilder(alias).aliases(otherAliases).build(), command);
|
register(metaBuilder(alias).aliases(otherAliases).build(), command);
|
||||||
@@ -64,7 +64,7 @@ public interface CommandManager {
|
|||||||
* @param command the command to register
|
* @param command the command to register
|
||||||
* @throws IllegalArgumentException if one of the given aliases is already registered, or
|
* @throws IllegalArgumentException if one of the given aliases is already registered, or
|
||||||
* the given command does not implement a registrable {@link Command} subinterface
|
* the given command does not implement a registrable {@link Command} subinterface
|
||||||
* @see Command for a list of registrable {@link Command} subinterfaces
|
* @see Command for a list of registrable subinterfaces
|
||||||
*/
|
*/
|
||||||
void register(CommandMeta meta, Command command);
|
void register(CommandMeta meta, Command command);
|
||||||
|
|
||||||
|
|||||||
@@ -534,14 +534,7 @@ public class VelocityServer implements ProxyServer, ForwardingAudience {
|
|||||||
shutdown = true;
|
shutdown = true;
|
||||||
|
|
||||||
if (explicitExit) {
|
if (explicitExit) {
|
||||||
AccessController.doPrivileged(new PrivilegedAction<Void>() {
|
System.exit(0);
|
||||||
@Override
|
|
||||||
@SuppressFBWarnings("DM_EXIT")
|
|
||||||
public Void run() {
|
|
||||||
System.exit(0);
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -82,8 +82,7 @@ public class JavaPluginLoader implements PluginLoader {
|
|||||||
}
|
}
|
||||||
|
|
||||||
URL pluginJarUrl = candidate.getSource().get().toUri().toURL();
|
URL pluginJarUrl = candidate.getSource().get().toUri().toURL();
|
||||||
PluginClassLoader loader = AccessController.doPrivileged(
|
PluginClassLoader loader = new PluginClassLoader(new URL[]{pluginJarUrl});
|
||||||
(PrivilegedAction<PluginClassLoader>) () -> new PluginClassLoader(new URL[]{pluginJarUrl}));
|
|
||||||
loader.addToClassloaders();
|
loader.addToClassloaders();
|
||||||
|
|
||||||
JavaVelocityPluginDescriptionCandidate candidateInst =
|
JavaVelocityPluginDescriptionCandidate candidateInst =
|
||||||
|
|||||||
Reference in New Issue
Block a user