13
0
geforkt von Mirrors/Velocity

[ci skip] make 'runShadow' workingDir use the 'run' directory (#1398)

Dieser Commit ist enthalten in:
powercas_gamer 2024-09-14 13:02:08 +02:00 committet von GitHub
Ursprung 0cd069ecbf
Commit 6f6d55e9e6
Es konnte kein GPG-Schlüssel zu dieser Signatur gefunden werden
GPG-Schlüssel-ID: B5690EEEBB952194
2 geänderte Dateien mit 17 neuen und 1 gelöschten Zeilen

Datei anzeigen

@ -92,6 +92,15 @@ tasks {
dependsOn(configurateBuildTask) dependsOn(configurateBuildTask)
from(zipTree(configurateBuildTask.map { it.outputs.files.singleFile })) from(zipTree(configurateBuildTask.map { it.outputs.files.singleFile }))
} }
runShadow {
workingDir = file("run").also(File::mkdirs)
standardInput = System.`in`
}
named<JavaExec>("run") {
workingDir = file("run").also(File::mkdirs)
standardInput = System.`in` // Doesn't work?
}
} }
dependencies { dependencies {

Datei anzeigen

@ -100,6 +100,7 @@ import net.kyori.adventure.translation.GlobalTranslator;
import net.kyori.adventure.translation.TranslationRegistry; import net.kyori.adventure.translation.TranslationRegistry;
import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger; import org.apache.logging.log4j.Logger;
import org.bstats.MetricsBase;
import org.checkerframework.checker.nullness.qual.EnsuresNonNull; import org.checkerframework.checker.nullness.qual.EnsuresNonNull;
import org.checkerframework.checker.nullness.qual.MonotonicNonNull; import org.checkerframework.checker.nullness.qual.MonotonicNonNull;
import org.checkerframework.checker.nullness.qual.NonNull; import org.checkerframework.checker.nullness.qual.NonNull;
@ -263,7 +264,13 @@ public class VelocityServer implements ProxyServer, ForwardingAudience {
this.cm.queryBind(configuration.getBind().getHostString(), configuration.getQueryPort()); this.cm.queryBind(configuration.getBind().getHostString(), configuration.getQueryPort());
} }
Metrics.VelocityMetrics.startMetrics(this, configuration.getMetrics()); final String defaultPackage = new String(
new byte[] { 'o', 'r', 'g', '.', 'b', 's', 't', 'a', 't', 's' });
if (!MetricsBase.class.getPackage().getName().startsWith(defaultPackage)) {
Metrics.VelocityMetrics.startMetrics(this, configuration.getMetrics());
} else {
logger.warn("debug environment, metrics is disabled!");
}
} }
private void registerTranslations() { private void registerTranslations() {