Begin remigrate to Shiroha

uhm
This commit is contained in:
2026-07-14 11:32:51 +08:00
parent 5661499e95
commit 576a9a44c8
60 changed files with 379 additions and 379 deletions
@@ -1,7 +1,7 @@
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
Subject: [PATCH] Rebrand to Shiroha
diff --git a/src/main/java/com/destroystokyo/paper/Metrics.java b/src/main/java/com/destroystokyo/paper/Metrics.java
@@ -13,7 +13,7 @@ index 08745a35b1ce8cc56d970472088de3cd17b9e43a..287cff1f4d994584457f00b1e42f283e
// 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 metrics = new Metrics("Camellia", serverUUID, logFailedRequests, Bukkit.getLogger()); // Folia - we have our own bstats page // Shiroha - Rebrand to Shiroha
metrics.addCustomChart(new Metrics.SimplePie("minecraft_version", () -> {
String minecraftVersion = Bukkit.getVersion();
@@ -22,12 +22,12 @@ index 08745a35b1ce8cc56d970472088de3cd17b9e43a..287cff1f4d994584457f00b1e42f283e
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
+ paperVersion = "git-Camellia-%s-%s".formatted(Bukkit.getServer().getMinecraftVersion(), buildOrHash); // Folia - we have our own bstats page // Shiroha - Rebrand to Shiroha
} 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.SimplePie("camellia_version", () -> paperVersion)); // Folia - we have our own bstats page // Shiroha - Rebrand to Shiroha
metrics.addCustomChart(new Metrics.DrilldownPie("java_version", () -> {
Map<String, Map<String, Integer>> map = new HashMap<>();
@@ -41,8 +41,8 @@ index 30815c8970b1f1c88a3c7bb5fd36efd915f1687d..05f159bb5a8499f8957367ed11a9f110
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 String DOWNLOAD_PAGE = "https://github.com/MonnaiRealms/Camellia"; // Folia // Shiroha - Rebrand to Shiroha
+ private static final String REPOSITORY = "MonnaiRealms/Camellia"; // Folia // Shiroha - Rebrand to Shiroha
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();
@@ -51,7 +51,7 @@ index 30815c8970b1f1c88a3c7bb5fd36efd915f1687d..05f159bb5a8499f8957367ed11a9f110
} 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
+ if (buildNumber.isPresent() && false) { // Shiroha - Rebrand to Shiroha - we do not have a version manager api currently, disable it
distance = fetchDistanceFromSiteApi(buildNumber.getAsInt());
} else {
final Optional<String> gitBranch = BUILD_INFO.gitBranch();
@@ -60,7 +60,7 @@ index 30815c8970b1f1c88a3c7bb5fd36efd915f1687d..05f159bb5a8499f8957367ed11a9f110
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
+ if (buildNumber.isPresent() && false) { // Shiroha - Rebrand to Shiroha - we do not have a version manager api currently, disable it
distance = fetchDistanceFromSiteApi(buildNumber.getAsInt());
} else {
final Optional<String> gitBranch = PaperVersionFetcher.BUILD_INFO.gitBranch();
@@ -72,7 +72,7 @@ index 10a0be7a4db1a51579d113d279af7a9effe7f438..45cf7c5c9a4de2c7422e4d9c27fa0064
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 BRAND_CAMELLIA_NAME = "Camellia"; // Shiroha - Rebrand to Shiroha
private static final String BUILD_DEV = "DEV";
@@ -81,10 +81,10 @@ index 10a0be7a4db1a51579d113d279af7a9effe7f438..45cf7c5c9a4de2c7422e4d9c27fa0064
getManifestAttribute(manifest, ATTRIBUTE_BRAND_ID)
.map(Key::key)
- .orElse(Key.key("papermc", "folia")), // Folia
+ .orElse(BRAND_CAMELLIA_ID), // Folia // Camellia - Rebrand to Camellia
+ .orElse(BRAND_CAMELLIA_ID), // Folia // Shiroha - Rebrand to Shiroha
getManifestAttribute(manifest, ATTRIBUTE_BRAND_NAME)
- .orElse("Folia"), // Folia
+ .orElse(BRAND_CAMELLIA_NAME), // Folia // Camellia - Rebrand to Camellia
+ .orElse(BRAND_CAMELLIA_NAME), // Folia // Shiroha - Rebrand to Shiroha
SharedConstants.getCurrentVersion().id(),
SharedConstants.getCurrentVersion().name(),
getManifestAttribute(manifest, ATTRIBUTE_BUILD_NUMBER)
@@ -93,7 +93,7 @@ index 10a0be7a4db1a51579d113d279af7a9effe7f438..45cf7c5c9a4de2c7422e4d9c27fa0064
@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
+ return brandId.equals(this.brandId) || brandId.equals(BRAND_PAPER_ID) || brandId.equals(BRAND_FOLIA_ID); // Shiroha - Rebrand to Shiroha
}
@Override
@@ -106,10 +106,10 @@ index 5607f4cc8ca2f620461eb5e97d01d9db0d6b2303..5a86fa68007bc00fcf3ceda2d2492322
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, "If you are unsure or still think this is a Camellia bug, please report this to https://github.com/MonnaiRealms/Camellia/issues"); // Shiroha - Rebrand to Shiroha
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
+ logger.log(Level.SEVERE, "Camellia version: " + Bukkit.getServer().getVersion()); // Shiroha - Rebrand to Shiroha
if (net.minecraft.world.level.Level.lastPhysicsProblem != null) {
logger.log(Level.SEVERE, "------------------------------");