From 1820a400f265a837c6213a45afc064ecf6b60ca5 Mon Sep 17 00:00:00 2001 From: Dreeam <61569423+Dreeam-qwq@users.noreply.github.com> Date: Mon, 17 Oct 2022 06:23:09 -0400 Subject: [PATCH] Updated Upstream (Mirai) --- .gitignore | 2 + build.gradle.kts | 36 ++-- gradle.properties | 2 +- gradle/wrapper/gradle-wrapper.properties | 2 +- gradlew | 261 +++++++++++++---------- gradlew.bat | 2 +- patches/api/0001-Leaf-config-files.patch | 4 +- patches/server/0001-Rebrand.patch | 78 +++---- settings.gradle.kts | 2 +- 9 files changed, 216 insertions(+), 173 deletions(-) diff --git a/.gitignore b/.gitignore index 26619ec64..4693f91b4 100644 --- a/.gitignore +++ b/.gitignore @@ -56,3 +56,5 @@ Leaf-API Leaf-MojangAPI Leaf-Server *.jar +/patches/todo-api/ +/patches/todo-server/ diff --git a/build.gradle.kts b/build.gradle.kts index c35bc56fd..3019a8060 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -1,70 +1,64 @@ -import io.papermc.paperweight.util.constants.* - plugins { java `maven-publish` id("com.github.johnrengelman.shadow") version "7.1.2" apply false - id("io.papermc.paperweight.patcher") version "1.3.8" + id("io.papermc.paperweight.patcher") version "1.3.9-SNAPSHOT" } +val paperMavenPublicUrl = "https://papermc.io/repo/repository/maven-public/" + repositories { mavenCentral() - maven("https://papermc.io/repo/repository/maven-public/") { - content { - onlyForConfigurations(PAPERCLIP_CONFIG) - } + maven(paperMavenPublicUrl) { + content { onlyForConfigurations(configurations.paperclip.name) } } } dependencies { - remapper("net.fabricmc:tiny-remapper:0.8.2:fat") - decompiler("net.minecraftforge:forgeflower:1.5.605.7") - paperclip("io.papermc:paperclip:3.0.2") + remapper("net.fabricmc:tiny-remapper:0.8.6:fat") + decompiler("org.quiltmc:quiltflower:1.8.1") + paperclip("io.papermc:paperclip:3.0.3-SNAPSHOT") } subprojects { apply(plugin = "java") + apply(plugin = "maven-publish") java { toolchain { languageVersion.set(JavaLanguageVersion.of(17)) } } -} -subprojects { - tasks.withType().configureEach { - options.encoding = "UTF-8" + tasks.withType { + options.encoding = Charsets.UTF_8.name() options.release.set(17) } - tasks.withType { options.encoding = Charsets.UTF_8.name() } - tasks.withType { filteringCharset = Charsets.UTF_8.name() } repositories { mavenCentral() + maven(paperMavenPublicUrl) maven("https://oss.sonatype.org/content/groups/public/") - maven("https://papermc.io/repo/repository/maven-public/") maven("https://ci.emc.gs/nexus/content/groups/aikar/") maven("https://repo.aikar.co/content/groups/aikar") maven("https://repo.md-5.net/content/repositories/releases/") maven("https://hub.spigotmc.org/nexus/content/groups/public/") maven("https://jitpack.io") - maven("https://oss.sonatype.org/content/repositories/snapshots/") + maven("https://repo.codemc.io/repository/maven-public/") } - } paperweight { serverProject.set(project(":leaf-server")) remapRepo.set("https://maven.fabricmc.net/") - decompileRepo.set("https://files.minecraftforge.net/maven/") + decompileRepo.set("https://maven.quiltmc.org/") useStandardUpstream("mirai") { url.set(github("etil2jz", "Mirai")) @@ -82,4 +76,4 @@ paperweight { serverOutputDir.set(layout.projectDirectory.dir("Leaf-Server")) } } -} +} \ No newline at end of file diff --git a/gradle.properties b/gradle.properties index 4ec93e8aa..b93775996 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,7 +1,7 @@ group = org.dreeam.leaf version = 1.19.2-R0.1-SNAPSHOT -MiraiCommit = 4ee7d3b369b92ab46df8ade9359cceb3b3404c9e +MiraiCommit = 041d65e8e66737e733bafb3874cc0ac99713f7e8 org.gradle.caching = true org.gradle.parallel = true diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index aa991fcea..ae04661ee 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,5 +1,5 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-7.4.2-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-7.5.1-bin.zip zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists diff --git a/gradlew b/gradlew index 4f906e0c8..37292d5c6 100644 --- a/gradlew +++ b/gradlew @@ -1,7 +1,7 @@ -#!/usr/bin/env sh +#!/bin/sh # -# Copyright 2015 the original author or authors. +# Copyright © 2015-2021 the original authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -17,67 +17,101 @@ # ############################################################################## -## -## Gradle start up script for UN*X -## +# +# Gradle start up script for POSIX generated by Gradle. +# +# Important for running: +# +# (1) You need a POSIX-compliant shell to run this script. If your /bin/sh is +# noncompliant, but you have some other compliant shell such as ksh or +# bash, then to run this script, type that shell name before the whole +# command line, like: +# +# ksh Gradle +# +# Busybox and similar reduced shells will NOT work, because this script +# requires all of these POSIX shell features: +# * functions; +# * expansions «$var», «${var}», «${var:-default}», «${var+SET}», +# «${var#prefix}», «${var%suffix}», and «$( cmd )»; +# * compound commands having a testable exit status, especially «case»; +# * various built-in commands including «command», «set», and «ulimit». +# +# Important for patching: +# +# (2) This script targets any POSIX shell, so it avoids extensions provided +# by Bash, Ksh, etc; in particular arrays are avoided. +# +# The "traditional" practice of packing multiple parameters into a +# space-separated string is a well documented source of bugs and security +# problems, so this is (mostly) avoided, by progressively accumulating +# options in "$@", and eventually passing that to Java. +# +# Where the inherited environment variables (DEFAULT_JVM_OPTS, JAVA_OPTS, +# and GRADLE_OPTS) rely on word-splitting, this is performed explicitly; +# see the in-line comments for details. +# +# There are tweaks for specific operating systems such as AIX, CygWin, +# Darwin, MinGW, and NonStop. +# +# (3) This script is generated from the Groovy template +# https://github.com/gradle/gradle/blob/master/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt +# within the Gradle project. +# +# You can find Gradle at https://github.com/gradle/gradle/. +# ############################################################################## # Attempt to set APP_HOME + # Resolve links: $0 may be a link -PRG="$0" -# Need this for relative symlinks. -while [ -h "$PRG" ] ; do - ls=`ls -ld "$PRG"` - link=`expr "$ls" : '.*-> \(.*\)$'` - if expr "$link" : '/.*' > /dev/null; then - PRG="$link" - else - PRG=`dirname "$PRG"`"/$link" - fi +app_path=$0 + +# Need this for daisy-chained symlinks. +while + APP_HOME=${app_path%"${app_path##*/}"} # leaves a trailing /; empty if no leading path + [ -h "$app_path" ] +do + ls=$( ls -ld "$app_path" ) + link=${ls#*' -> '} + case $link in #( + /*) app_path=$link ;; #( + *) app_path=$APP_HOME$link ;; + esac done -SAVED="`pwd`" -cd "`dirname \"$PRG\"`/" >/dev/null -APP_HOME="`pwd -P`" -cd "$SAVED" >/dev/null + +APP_HOME=$( cd "${APP_HOME:-./}" && pwd -P ) || exit APP_NAME="Gradle" -APP_BASE_NAME=`basename "$0"` +APP_BASE_NAME=${0##*/} # Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"' # Use the maximum available, or set MAX_FD != -1 to use that value. -MAX_FD="maximum" +MAX_FD=maximum warn () { echo "$*" -} +} >&2 die () { echo echo "$*" echo exit 1 -} +} >&2 # OS specific support (must be 'true' or 'false'). cygwin=false msys=false darwin=false nonstop=false -case "`uname`" in - CYGWIN* ) - cygwin=true - ;; - Darwin* ) - darwin=true - ;; - MINGW* ) - msys=true - ;; - NONSTOP* ) - nonstop=true - ;; +case "$( uname )" in #( + CYGWIN* ) cygwin=true ;; #( + Darwin* ) darwin=true ;; #( + MSYS* | MINGW* ) msys=true ;; #( + NONSTOP* ) nonstop=true ;; esac CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar @@ -87,99 +121,112 @@ CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar if [ -n "$JAVA_HOME" ] ; then if [ -x "$JAVA_HOME/jre/sh/java" ] ; then # IBM's JDK on AIX uses strange locations for the executables - JAVACMD="$JAVA_HOME/jre/sh/java" + JAVACMD=$JAVA_HOME/jre/sh/java else - JAVACMD="$JAVA_HOME/bin/java" + JAVACMD=$JAVA_HOME/bin/java fi if [ ! -x "$JAVACMD" ] ; then die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME - Please set the JAVA_HOME variable in your environment to match the location of your Java installation." fi else - JAVACMD="java" + JAVACMD=java which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. - Please set the JAVA_HOME variable in your environment to match the location of your Java installation." fi # Increase the maximum file descriptors if we can. -if [ "$cygwin" = "false" -a "$darwin" = "false" -a "$nonstop" = "false" ] ; then - MAX_FD_LIMIT=`ulimit -H -n` - if [ $? -eq 0 ] ; then - if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then - MAX_FD="$MAX_FD_LIMIT" - fi - ulimit -n $MAX_FD - if [ $? -ne 0 ] ; then - warn "Could not set maximum file descriptor limit: $MAX_FD" - fi - else - warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT" - fi +if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then + case $MAX_FD in #( + max*) + MAX_FD=$( ulimit -H -n ) || + warn "Could not query maximum file descriptor limit" + esac + case $MAX_FD in #( + '' | soft) :;; #( + *) + ulimit -n "$MAX_FD" || + warn "Could not set maximum file descriptor limit to $MAX_FD" + esac fi -# For Darwin, add options to specify how the application appears in the dock -if $darwin; then - GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\"" -fi +# Collect all arguments for the java command, stacking in reverse order: +# * args from the command line +# * the main class name +# * -classpath +# * -D...appname settings +# * --module-path (only if needed) +# * DEFAULT_JVM_OPTS, JAVA_OPTS, and GRADLE_OPTS environment variables. # For Cygwin or MSYS, switch paths to Windows format before running java -if [ "$cygwin" = "true" -o "$msys" = "true" ] ; then - APP_HOME=`cygpath --path --mixed "$APP_HOME"` - CLASSPATH=`cygpath --path --mixed "$CLASSPATH"` - - JAVACMD=`cygpath --unix "$JAVACMD"` - - # We build the pattern for arguments to be converted via cygpath - ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null` - SEP="" - for dir in $ROOTDIRSRAW ; do - ROOTDIRS="$ROOTDIRS$SEP$dir" - SEP="|" - done - OURCYGPATTERN="(^($ROOTDIRS))" - # Add a user-defined pattern to the cygpath arguments - if [ "$GRADLE_CYGPATTERN" != "" ] ; then - OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)" - fi +if "$cygwin" || "$msys" ; then + APP_HOME=$( cygpath --path --mixed "$APP_HOME" ) + CLASSPATH=$( cygpath --path --mixed "$CLASSPATH" ) + + JAVACMD=$( cygpath --unix "$JAVACMD" ) + # Now convert the arguments - kludge to limit ourselves to /bin/sh - i=0 - for arg in "$@" ; do - CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -` - CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option - - if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition - eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"` - else - eval `echo args$i`="\"$arg\"" + for arg do + if + case $arg in #( + -*) false ;; # don't mess with options #( + /?*) t=${arg#/} t=/${t%%/*} # looks like a POSIX filepath + [ -e "$t" ] ;; #( + *) false ;; + esac + then + arg=$( cygpath --path --ignore --mixed "$arg" ) fi - i=`expr $i + 1` + # Roll the args list around exactly as many times as the number of + # args, so each arg winds up back in the position where it started, but + # possibly modified. + # + # NB: a `for` loop captures its iteration list before it begins, so + # changing the positional parameters here affects neither the number of + # iterations, nor the values presented in `arg`. + shift # remove old arg + set -- "$@" "$arg" # push replacement arg done - case $i in - 0) set -- ;; - 1) set -- "$args0" ;; - 2) set -- "$args0" "$args1" ;; - 3) set -- "$args0" "$args1" "$args2" ;; - 4) set -- "$args0" "$args1" "$args2" "$args3" ;; - 5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;; - 6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;; - 7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;; - 8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;; - 9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;; - esac fi -# Escape application args -save () { - for i do printf %s\\n "$i" | sed "s/'/'\\\\''/g;1s/^/'/;\$s/\$/' \\\\/" ; done - echo " " -} -APP_ARGS=`save "$@"` +# Collect all arguments for the java command; +# * $DEFAULT_JVM_OPTS, $JAVA_OPTS, and $GRADLE_OPTS can contain fragments of +# shell script including quotes and variable substitutions, so put them in +# double quotes to make sure that they get re-expanded; and +# * put everything else in single quotes, so that it's not re-expanded. + +set -- \ + "-Dorg.gradle.appname=$APP_BASE_NAME" \ + -classpath "$CLASSPATH" \ + org.gradle.wrapper.GradleWrapperMain \ + "$@" + +# Use "xargs" to parse quoted args. +# +# With -n1 it outputs one arg per line, with the quotes and backslashes removed. +# +# In Bash we could simply go: +# +# readarray ARGS < <( xargs -n1 <<<"$var" ) && +# set -- "${ARGS[@]}" "$@" +# +# but POSIX shell has neither arrays nor command substitution, so instead we +# post-process each arg (as a line of input to sed) to backslash-escape any +# character that might be a shell metacharacter, then use eval to reverse +# that process (while maintaining the separation between arguments), and wrap +# the whole thing up as a single "set" statement. +# +# This will of course break if any of these variables contains a newline or +# an unmatched quote. +# -# Collect all arguments for the java command, following the shell quoting and substitution rules -eval set -- $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS "\"-Dorg.gradle.appname=$APP_BASE_NAME\"" -classpath "\"$CLASSPATH\"" org.gradle.wrapper.GradleWrapperMain "$APP_ARGS" +eval "set -- $( + printf '%s\n' "$DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS" | + xargs -n1 | + sed ' s~[^-[:alnum:]+,./:=@_]~\\&~g; ' | + tr '\n' ' ' + )" '"$@"' -exec "$JAVACMD" "$@" +exec "$JAVACMD" "$@" \ No newline at end of file diff --git a/gradlew.bat b/gradlew.bat index 107acd32c..477c89664 100644 --- a/gradlew.bat +++ b/gradlew.bat @@ -86,4 +86,4 @@ exit /b 1 :mainEnd if "%OS%"=="Windows_NT" endlocal -:omega +:omega \ No newline at end of file diff --git a/patches/api/0001-Leaf-config-files.patch b/patches/api/0001-Leaf-config-files.patch index 972b639b5..0a0bdb8e9 100644 --- a/patches/api/0001-Leaf-config-files.patch +++ b/patches/api/0001-Leaf-config-files.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Leaf config files diff --git a/src/main/java/org/bukkit/Server.java b/src/main/java/org/bukkit/Server.java -index f25e6808c9ce7276c3e49c6ad03eda5ffa35e5f8..06f44abeb0918899ca316f51311bcc1dacac541c 100644 +index 259209a999b80542a21ce6083301d3848d4006af..fb3cf201d4e6fe23fbf9109b9a752963ab0f1cd6 100644 --- a/src/main/java/org/bukkit/Server.java +++ b/src/main/java/org/bukkit/Server.java -@@ -1960,6 +1960,14 @@ public interface Server extends PluginMessageRecipient, net.kyori.adventure.audi +@@ -1981,6 +1981,14 @@ public interface Server extends PluginMessageRecipient, net.kyori.adventure.audi } // Mirai end diff --git a/patches/server/0001-Rebrand.patch b/patches/server/0001-Rebrand.patch index c9c31d552..bd079785c 100644 --- a/patches/server/0001-Rebrand.patch +++ b/patches/server/0001-Rebrand.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Rebrand diff --git a/build.gradle.kts b/build.gradle.kts -index b3b74bfee4a568697f36d6fab9f77652911c75ff..f33f2ec881d0303a49ff40cbbd2a798e4ff09255 100644 +index 65441b943a97f8aa453f31bf5cf7f87862fdcc07..635ad148c2bd9ac030f57d6c9fc3204894f4ebcb 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -9,7 +9,7 @@ plugins { @@ -26,32 +26,6 @@ index b3b74bfee4a568697f36d6fab9f77652911c75ff..f33f2ec881d0303a49ff40cbbd2a798e "Implementation-Vendor" to date, // Paper "Specification-Title" to "Bukkit", "Specification-Version" to project.version, -diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index d2298a4c77ebfd3c93ad83959e8e685d8f85e052..7f764e53851128fdaf53c34f661004d9b5334d37 100644 ---- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java -+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -@@ -250,7 +250,7 @@ import javax.annotation.Nullable; // Paper - import javax.annotation.Nonnull; // Paper - - public final class CraftServer implements Server { -- private final String serverName = "Mirai"; // Paper // Pufferfish // Mirai -+ private final String serverName = "Leaf"; // Paper // Pufferfish // Mirai // Leaf - private final String serverVersion; - private final String bukkitVersion = Versioning.getBukkitVersion(); - private final Logger logger = Logger.getLogger("Minecraft"); -diff --git a/src/main/java/org/bukkit/craftbukkit/util/Versioning.java b/src/main/java/org/bukkit/craftbukkit/util/Versioning.java -index bcdb4fd83b665a6f96b6d6e989f2cfe2370cc0db..af21448e0a80b65e941337b8c30c13eb6641bde2 100644 ---- a/src/main/java/org/bukkit/craftbukkit/util/Versioning.java -+++ b/src/main/java/org/bukkit/craftbukkit/util/Versioning.java -@@ -13,7 +13,7 @@ public final class Versioning { - static { - bukkitVersion = "Unknown-Version"; - -- InputStream stream = Bukkit.class.getClassLoader().getResourceAsStream("META-INF/maven/wtf.etil.mirai/mirai-api/pom.properties"); // Pufferfish // Mirai -+ InputStream stream = Bukkit.class.getClassLoader().getResourceAsStream("META-INF/maven/org.dreeam.leaf/leaf-api/pom.properties"); // Pufferfish // Mirai // Leaf - Properties properties = new Properties(); - - if (stream != null) { diff --git a/src/main/java/com/destroystokyo/paper/console/PaperConsole.java b/src/main/java/com/destroystokyo/paper/console/PaperConsole.java index d0a342ce8a5cc1a12ecab7969187166fe3597708..686e69ffaa6cf12650aae1144a3e1006c794f061 100644 --- a/src/main/java/com/destroystokyo/paper/console/PaperConsole.java @@ -66,10 +40,10 @@ index d0a342ce8a5cc1a12ecab7969187166fe3597708..686e69ffaa6cf12650aae1144a3e1006 .completer(new ConsoleCommandCompleter(this.server)) .option(LineReader.Option.COMPLETE_IN_WORD, true); diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index 2789eb371b3c9c8803a10d07f8c21ced49ad6d16..81c8016f165d1b7417c7fd69f43cb257446b3541 100644 +index 3c528e612e9ed17e8c58bbef6c26471cc3411a7a..89637d784a168cd99870ec3e734ccd65867ac940 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java -@@ -913,7 +913,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop // Pufferfish - Pufferfish > // Paper - Paper > // Spigot - Spigot > // CraftBukkit - cb > vanilla! + return "Leaf"; // Leaf - Leaf > // Mirai - Mirai > // Pufferfish - Pufferfish > // Paper - Paper > // Spigot - Spigot > // CraftBukkit - cb > vanilla! } - + public SystemReport fillSystemReport(SystemReport details) { +diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java +index cc9c5eecc4ef1d5dc4e814ad89a40a34f4d48a69..430976580031820093eb88db55cae12304d4f075 100644 +--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java ++++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java +@@ -250,7 +250,7 @@ import javax.annotation.Nullable; // Paper + import javax.annotation.Nonnull; // Paper + + public final class CraftServer implements Server { +- private final String serverName = "Mirai"; // Paper // Pufferfish // Mirai ++ private final String serverName = "Leaf"; // Paper // Pufferfish // Mirai // Leaf + private final String serverVersion; + private final String bukkitVersion = Versioning.getBukkitVersion(); + private final Logger logger = Logger.getLogger("Minecraft"); +diff --git a/src/main/java/org/bukkit/craftbukkit/util/Versioning.java b/src/main/java/org/bukkit/craftbukkit/util/Versioning.java +index fdfb304a860a1c5bda8fa6a9a5fc6e65cd1e6df4..af21448e0a80b65e941337b8c30c13eb6641bde2 100644 +--- a/src/main/java/org/bukkit/craftbukkit/util/Versioning.java ++++ b/src/main/java/org/bukkit/craftbukkit/util/Versioning.java +@@ -13,7 +13,7 @@ public final class Versioning { + static { + bukkitVersion = "Unknown-Version"; + +- InputStream stream = Bukkit.class.getClassLoader().getResourceAsStream("META-INF/maven/dev.etil.mirai/mirai-api/pom.properties"); // Pufferfish // Mirai ++ InputStream stream = Bukkit.class.getClassLoader().getResourceAsStream("META-INF/maven/org.dreeam.leaf/leaf-api/pom.properties"); // Pufferfish // Mirai // Leaf + Properties properties = new Properties(); + + if (stream != null) { diff --git a/src/main/java/org/spigotmc/WatchdogThread.java b/src/main/java/org/spigotmc/WatchdogThread.java -index 413bcdb0389718a73047a114e6f5d05d96bdcf43..11401b9bddd3fe5717fa48f8bcfa9f1138a67269 100644 +index a566fa4b061961fb07720642564c4d521fbacab6..e45ee29061601b17bba4ee5855195f67e9a3a43a 100644 --- a/src/main/java/org/spigotmc/WatchdogThread.java +++ b/src/main/java/org/spigotmc/WatchdogThread.java -@@ -155,14 +155,14 @@ public class WatchdogThread extends Thread +@@ -155,14 +155,14 @@ public final class WatchdogThread extends io.papermc.paper.util.TickThread // Pa if (isLongTimeout) { // Paper end log.log( Level.SEVERE, "------------------------------" ); @@ -109,7 +109,7 @@ index 413bcdb0389718a73047a114e6f5d05d96bdcf43..11401b9bddd3fe5717fa48f8bcfa9f11 // if ( net.minecraft.world.level.Level.lastPhysicsProblem != null ) { -@@ -185,12 +185,12 @@ public class WatchdogThread extends Thread +@@ -185,12 +185,12 @@ public final class WatchdogThread extends io.papermc.paper.util.TickThread // Pa // Paper end } else { @@ -121,15 +121,15 @@ index 413bcdb0389718a73047a114e6f5d05d96bdcf43..11401b9bddd3fe5717fa48f8bcfa9f11 log.log( Level.SEVERE, "------------------------------" ); - log.log( Level.SEVERE, "Server thread dump (Look for plugins here before reporting to Mirai!):" ); // Paper // Mirai + log.log( Level.SEVERE, "Server thread dump (Look for plugins here before reporting to Leaf!):" ); // Paper // Mirai // Leaf - com.destroystokyo.paper.io.chunk.ChunkTaskManager.dumpAllChunkLoadInfo(); // Paper + io.papermc.paper.chunk.system.scheduling.ChunkTaskScheduler.dumpAllChunkLoadInfo(isLongTimeout); // Paper // Paper - rewrite chunk system this.dumpTickingInfo(); // Paper - log detailed tick information - WatchdogThread.dumpThread( ManagementFactory.getThreadMXBean().getThreadInfo( server.serverThread.getId(), Integer.MAX_VALUE ), log ); -@@ -206,7 +206,7 @@ public class WatchdogThread extends Thread + WatchdogThread.dumpThread( ManagementFactory.getThreadMXBean().getThreadInfo( MinecraftServer.getServer().serverThread.getId(), Integer.MAX_VALUE ), log ); +@@ -206,7 +206,7 @@ public final class WatchdogThread extends io.papermc.paper.util.TickThread // Pa WatchdogThread.dumpThread( thread, log ); } } else { - log.log(Level.SEVERE, "--- DO NOT REPORT THIS TO MIRAI - THIS IS NOT A BUG OR A CRASH ---"); // Mirai + log.log(Level.SEVERE, "--- DO NOT REPORT THIS TO LEAF - THIS IS NOT A BUG OR A CRASH ---"); // Mirai /Leaf } - + log.log( Level.SEVERE, "------------------------------" ); diff --git a/settings.gradle.kts b/settings.gradle.kts index cca2579bf..c85216361 100644 --- a/settings.gradle.kts +++ b/settings.gradle.kts @@ -3,7 +3,7 @@ import java.util.Locale pluginManagement { repositories { gradlePluginPortal() - maven("https://papermc.io/repo/repository/maven-public/") + maven("https://repo.papermc.io/repository/maven-public/") } }