116 lines
8.5 KiB
Diff
116 lines
8.5 KiB
Diff
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
From: MrHua269 <mrhua269@gmail.com>
|
|
Date: Wed, 8 Jul 2026 18:15:19 +0800
|
|
Subject: [PATCH] Rebrand to Camellia
|
|
|
|
|
|
diff --git a/src/main/java/com/destroystokyo/paper/Metrics.java b/src/main/java/com/destroystokyo/paper/Metrics.java
|
|
index 08745a35b1ce8cc56d970472088de3cd17b9e43a..287cff1f4d994584457f00b1e42f283e92585033 100644
|
|
--- a/src/main/java/com/destroystokyo/paper/Metrics.java
|
|
+++ b/src/main/java/com/destroystokyo/paper/Metrics.java
|
|
@@ -593,7 +593,7 @@ public class Metrics {
|
|
boolean logFailedRequests = config.getBoolean("logFailedRequests", false);
|
|
// Only start Metrics, if it's enabled in the config
|
|
if (config.getBoolean("enabled", true)) {
|
|
- Metrics metrics = new Metrics("Folia", serverUUID, logFailedRequests, Bukkit.getLogger()); // Folia - we have our own bstats page
|
|
+ Metrics metrics = new Metrics("Camellia", serverUUID, logFailedRequests, Bukkit.getLogger()); // Folia - we have our own bstats page // Camellia - Rebrand to Camellia
|
|
|
|
metrics.addCustomChart(new Metrics.SimplePie("minecraft_version", () -> {
|
|
String minecraftVersion = Bukkit.getVersion();
|
|
@@ -607,11 +607,11 @@ public class Metrics {
|
|
final String implVersion = org.bukkit.craftbukkit.Main.class.getPackage().getImplementationVersion();
|
|
if (implVersion != null) {
|
|
final String buildOrHash = implVersion.substring(implVersion.lastIndexOf('-') + 1);
|
|
- paperVersion = "git-Folia-%s-%s".formatted(Bukkit.getServer().getMinecraftVersion(), buildOrHash); // Folia - we have our own bstats page
|
|
+ paperVersion = "git-Camellia-%s-%s".formatted(Bukkit.getServer().getMinecraftVersion(), buildOrHash); // Folia - we have our own bstats page // Camellia - Rebrand to Camellia
|
|
} else {
|
|
paperVersion = "unknown";
|
|
}
|
|
- metrics.addCustomChart(new Metrics.SimplePie("folia_version", () -> paperVersion)); // Folia - we have our own bstats page
|
|
+ metrics.addCustomChart(new Metrics.SimplePie("camellia_version", () -> paperVersion)); // Folia - we have our own bstats page // Camellia - Rebrand to Camellia
|
|
|
|
metrics.addCustomChart(new Metrics.DrilldownPie("java_version", () -> {
|
|
Map<String, Map<String, Integer>> map = new HashMap<>();
|
|
diff --git a/src/main/java/com/destroystokyo/paper/PaperVersionFetcher.java b/src/main/java/com/destroystokyo/paper/PaperVersionFetcher.java
|
|
index 30815c8970b1f1c88a3c7bb5fd36efd915f1687d..05f159bb5a8499f8957367ed11a9f11035de418a 100644
|
|
--- a/src/main/java/com/destroystokyo/paper/PaperVersionFetcher.java
|
|
+++ b/src/main/java/com/destroystokyo/paper/PaperVersionFetcher.java
|
|
@@ -40,8 +40,8 @@ public class PaperVersionFetcher implements VersionFetcher {
|
|
private static final ComponentLogger COMPONENT_LOGGER = ComponentLogger.logger(LogManager.getRootLogger().getName());
|
|
private static final int DISTANCE_ERROR = -1;
|
|
private static final int DISTANCE_UNKNOWN = -2;
|
|
- private static final String DOWNLOAD_PAGE = "https://papermc.io/downloads/folia"; // Folia
|
|
- private static final String REPOSITORY = "PaperMC/Folia"; // Folia
|
|
+ private static final String DOWNLOAD_PAGE = "https://github.com/MonnaiRealms/Camellia"; // Folia // Camellia - Rebrand to Camellia
|
|
+ private static final String REPOSITORY = "MonnaiRealms/Camellia"; // Folia // Camellia - Rebrand to Camellia
|
|
private static final ServerBuildInfo BUILD_INFO = ServerBuildInfo.buildInfo();
|
|
private static final String USER_AGENT = BUILD_INFO.brandName() + "/" + BUILD_INFO.asString(VERSION_SIMPLE) + " (https://papermc.io)";
|
|
private static final Gson GSON = new Gson();
|
|
@@ -72,7 +72,7 @@ public class PaperVersionFetcher implements VersionFetcher {
|
|
COMPONENT_LOGGER.warn(text("*** You are running a development version without access to version information ***"));
|
|
} else {
|
|
final Optional<MinecraftVersionFetcher> apiResult = fetchMinecraftVersionList();
|
|
- if (buildNumber.isPresent()) {
|
|
+ if (buildNumber.isPresent() && false) { // Camellia - Rebrand to Camellia - we do not have a version manager api currently, disable it
|
|
distance = fetchDistanceFromSiteApi(buildNumber.getAsInt());
|
|
} else {
|
|
final Optional<String> gitBranch = BUILD_INFO.gitBranch();
|
|
@@ -111,7 +111,7 @@ public class PaperVersionFetcher implements VersionFetcher {
|
|
int distance = DISTANCE_ERROR;
|
|
|
|
final OptionalInt buildNumber = PaperVersionFetcher.BUILD_INFO.buildNumber();
|
|
- if (buildNumber.isPresent()) {
|
|
+ if (buildNumber.isPresent() && false) { // Camellia - Rebrand to Camellia - we do not have a version manager api currently, disable it
|
|
distance = fetchDistanceFromSiteApi(buildNumber.getAsInt());
|
|
} else {
|
|
final Optional<String> gitBranch = PaperVersionFetcher.BUILD_INFO.gitBranch();
|
|
diff --git a/src/main/java/io/papermc/paper/ServerBuildInfoImpl.java b/src/main/java/io/papermc/paper/ServerBuildInfoImpl.java
|
|
index 10a0be7a4db1a51579d113d279af7a9effe7f438..45cf7c5c9a4de2c7422e4d9c27fa0064f81f11cf 100644
|
|
--- a/src/main/java/io/papermc/paper/ServerBuildInfoImpl.java
|
|
+++ b/src/main/java/io/papermc/paper/ServerBuildInfoImpl.java
|
|
@@ -31,6 +31,7 @@ public record ServerBuildInfoImpl(
|
|
private static final String ATTRIBUTE_GIT_COMMIT = "Git-Commit";
|
|
|
|
private static final String BRAND_PAPER_NAME = "Paper";
|
|
+ private static final String BRAND_CAMELLIA_NAME = "Camellia"; // Camellia - Rebrand to Camellia
|
|
|
|
private static final String BUILD_DEV = "DEV";
|
|
|
|
@@ -42,9 +43,9 @@ public record ServerBuildInfoImpl(
|
|
this(
|
|
getManifestAttribute(manifest, ATTRIBUTE_BRAND_ID)
|
|
.map(Key::key)
|
|
- .orElse(Key.key("papermc", "folia")), // Folia
|
|
+ .orElse(BRAND_CAMELLIA_ID), // Folia // Camellia - Rebrand to Camellia
|
|
getManifestAttribute(manifest, ATTRIBUTE_BRAND_NAME)
|
|
- .orElse("Folia"), // Folia
|
|
+ .orElse(BRAND_CAMELLIA_NAME), // Folia // Camellia - Rebrand to Camellia
|
|
SharedConstants.getCurrentVersion().id(),
|
|
SharedConstants.getCurrentVersion().name(),
|
|
getManifestAttribute(manifest, ATTRIBUTE_BUILD_NUMBER)
|
|
@@ -61,7 +62,7 @@ public record ServerBuildInfoImpl(
|
|
|
|
@Override
|
|
public boolean isBrandCompatible(final @NotNull Key brandId) {
|
|
- return brandId.equals(this.brandId);
|
|
+ return brandId.equals(this.brandId) || brandId.equals(BRAND_PAPER_ID) || brandId.equals(BRAND_FOLIA_ID); // Camellia - Rebrand to Camellia
|
|
}
|
|
|
|
@Override
|
|
diff --git a/src/main/java/org/spigotmc/WatchdogThread.java b/src/main/java/org/spigotmc/WatchdogThread.java
|
|
index 5607f4cc8ca2f620461eb5e97d01d9db0d6b2303..5a86fa68007bc00fcf3ceda2d24923227410c42e 100644
|
|
--- a/src/main/java/org/spigotmc/WatchdogThread.java
|
|
+++ b/src/main/java/org/spigotmc/WatchdogThread.java
|
|
@@ -80,9 +80,9 @@ public class WatchdogThread extends ca.spottedleaf.moonrise.common.util.TickThre
|
|
logger.log(Level.SEVERE, "\t *Especially* if it looks like HTTP or MySQL operations are occurring");
|
|
logger.log(Level.SEVERE, "If you see a world save or edit, then it means you did far more than your server can handle at once");
|
|
logger.log(Level.SEVERE, "\t If this is the case, consider increasing timeout-time in spigot.yml but note that this will replace the crash with LARGE lag spikes");
|
|
- logger.log(Level.SEVERE, "If you are unsure or still think this is a Paper bug, please report this to https://github.com/PaperMC/Paper/issues");
|
|
+ logger.log(Level.SEVERE, "If you are unsure or still think this is a Camellia bug, please report this to https://github.com/MonnaiRealms/Camellia/issues"); // Camellia - Rebrand to Camellia
|
|
logger.log(Level.SEVERE, "Be sure to include ALL relevant console errors and Minecraft crash reports");
|
|
- logger.log(Level.SEVERE, "Paper version: " + Bukkit.getServer().getVersion());
|
|
+ logger.log(Level.SEVERE, "Camellia version: " + Bukkit.getServer().getVersion()); // Camellia - Rebrand to Camellia
|
|
|
|
if (net.minecraft.world.level.Level.lastPhysicsProblem != null) {
|
|
logger.log(Level.SEVERE, "------------------------------");
|