Skip to content

Commit

Permalink
Fix build
Browse files Browse the repository at this point in the history
  • Loading branch information
AlphaKR93 committed May 26, 2024
1 parent 15a9cac commit 6d70d21
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 7 deletions.
1 change: 1 addition & 0 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ paper.runMemoryGb = 8
paper.runDisableWatchdog = true

group = org.plazmamc.plazma
brandKey = plazmamc:plazma
brandName = Plazma
providerName = PlazmaMC
providerRepo = PlazmaMC/PlazmaBukkit
Expand Down
8 changes: 4 additions & 4 deletions patches/server/0004-Fork-friendly-Rebranding.patch
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ index 3cb56595822799926a8141e60a42f5d1edfc6de5..70d6e514870b5cdf529eb067137a5c15
.option(LineReader.Option.COMPLETE_IN_WORD, true);
diff --git a/src/main/java/io/papermc/paper/ServerBrandConstants.java b/src/main/java/io/papermc/paper/ServerBrandConstants.java
new file mode 100644
index 0000000000000000000000000000000000000000..c60e1ce73b80125efaf8bff273d3bffa90a20b39
index 0000000000000000000000000000000000000000..b085cb9b49f2b6b1ad72448959d57a5a7b1f1f21
--- /dev/null
+++ b/src/main/java/io/papermc/paper/ServerBrandConstants.java
@@ -0,0 +1,33 @@
Expand All @@ -137,7 +137,7 @@ index 0000000000000000000000000000000000000000..c60e1ce73b80125efaf8bff273d3bffa
+public enum ServerBrandConstants {;
+
+ // Basic brand informations
+ private static final String BRAND_NAME = "Plazma";
+ protected static final String BRAND_NAME = "Plazma";
+ public static final String RESOURCE_PATH = "META-INF/maven/org.plazmamc.plazma/plazma-api/pom.properties";
+
+ @Nullable
Expand Down Expand Up @@ -217,7 +217,7 @@ index 96142deb42700f888ea08689ab62c27ef2b881fd..62b602450a53cfebf08f839b505d0e96
}
}
diff --git a/src/main/java/net/minecraft/CrashReport.java b/src/main/java/net/minecraft/CrashReport.java
index c366d84518979e842a6f10f969a5951539ecac93..4d4a565435c1c73d0693be89b4a6624d1a8515eb 100644
index c366d84518979e842a6f10f969a5951539ecac93..4a885298859a0dff663d12075c82b42b48cce2ef 100644
--- a/src/main/java/net/minecraft/CrashReport.java
+++ b/src/main/java/net/minecraft/CrashReport.java
@@ -37,7 +37,7 @@ public class CrashReport {
Expand All @@ -234,7 +234,7 @@ index c366d84518979e842a6f10f969a5951539ecac93..4d4a565435c1c73d0693be89b4a6624d
// Purpur start
stringbuilder.append("// ");
- stringbuilder.append("// DO NOT REPORT THIS TO PAPER! REPORT TO PURPUR INSTEAD!");
+ stringbuilder.append("// DO NOT REPORT THIS TO PAPER OR PURPUR! REPORT TO %s INSTEAD!".formatted(io.papermc.paper.ServerBuildInfoImpl.BRAND_UCASE)); // Plazma - Fork-friendly Rebranding
+ stringbuilder.append("// DO NOT REPORT THIS TO PAPER OR PURPUR! REPORT TO %s INSTEAD!".formatted(io.papermc.paper.ServerBrandConstants.BRAND_UCASE)); // Plazma - Fork-friendly Rebranding
// Purpur end
stringbuilder.append("// ");
stringbuilder.append(CrashReport.getErrorComment());
Expand Down
6 changes: 3 additions & 3 deletions patches/server/0009-Warn-on-startup.patch
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ Subject: [PATCH] Warn on startup


diff --git a/src/main/java/net/minecraft/server/Main.java b/src/main/java/net/minecraft/server/Main.java
index 4911a6d25d12eb9d2b263aeb9b7f521ff828397a..ab19474f251e1cca9455559db15023a6254c3524 100644
index 4911a6d25d12eb9d2b263aeb9b7f521ff828397a..57deffa2f3d2f0074512440e668c71afb38510d4 100644
--- a/src/main/java/net/minecraft/server/Main.java
+++ b/src/main/java/net/minecraft/server/Main.java
@@ -112,6 +112,18 @@ public class Main {
Expand All @@ -15,9 +15,9 @@ index 4911a6d25d12eb9d2b263aeb9b7f521ff828397a..ab19474f251e1cca9455559db15023a6
+ // Plazma start - Warn on startup
+ if (!org.plazmamc.plazma.Options.NO_WARN) {
+ LOGGER.warn("Warning! " + io.papermc.paper.ServerBuildInfo.buildInfo().brandName() + " may cause unexpected problems, so be sure to test it thoroughly before using it on a public server.");
+ if (io.papermc.paper.ServerBuildInfo.buildInfo().asString().contains("DEV")) {
+ if (io.papermc.paper.ServerBuildInfo.buildInfo().asString(io.papermc.paper.ServerBuildInfo.StringRepresentation.VERSION_FULL).contains("DEV")) {
+ LOGGER.error("*********************** CAUTION ***********************");
+ LOGGER.error("This version is a development version of " + io.papermc.paper.ServerBuildInfo.buildInfo().brandName() + ".");
+ LOGGER.error("This version is a development version of {}.", io.papermc.paper.ServerBuildInfo.buildInfo().brandName());
+ LOGGER.error("Nobody knows what kind of problem you're going to have, and there's always the possibility of unexpected problems.");
+ LOGGER.error("Never use this version on a public server, and after you've tested it enough before using it!");
+ LOGGER.error("*******************************************************");
Expand Down

0 comments on commit 6d70d21

Please sign in to comment.