Skip to content

Commit

Permalink
Fix startup
Browse files Browse the repository at this point in the history
  • Loading branch information
AlphaKR93 committed May 27, 2024
1 parent 305ff4d commit e6586da
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
12 changes: 6 additions & 6 deletions patches/server/0004-Fork-friendly-Rebranding.patch
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ Subject: [PATCH] Fork-friendly Rebranding


diff --git a/build.gradle.kts b/build.gradle.kts
index c2a0dd63fe700484ac9473733b10615375d7c2b4..acca28dd3e99821e4f55794946ed27b7e8c780a5 100644
index 80343712d0cb4e10d31581f36e487a0b35711cfe..afa4877ade6cf8b615ba70c1cf7a8c92040e924a 100644
--- a/build.gradle.kts
+++ b/build.gradle.kts
@@ -13,7 +13,7 @@ configurations.named(log4jPlugins.compileClasspathConfigurationName) {
Expand Down 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..b085cb9b49f2b6b1ad72448959d57a5a7b1f1f21
index 0000000000000000000000000000000000000000..af534fb15be2be3e5b4258c522e0e6c967c2bb1c
--- /dev/null
+++ b/src/main/java/io/papermc/paper/ServerBrandConstants.java
@@ -0,0 +1,33 @@
Expand All @@ -137,7 +137,7 @@ index 0000000000000000000000000000000000000000..b085cb9b49f2b6b1ad72448959d57a5a
+public enum ServerBrandConstants {;
+
+ // Basic brand informations
+ protected static final String BRAND_NAME = "Plazma";
+ public 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 @@ -384,15 +384,15 @@ index 1090b7e36e3c1c105bc36135b82751c651f237d4..a5b3f9309393fd54c0aec2918410b331

private static CompoundTag readOversizedChunk(RegionFile regionfile, ChunkPos chunkCoordinate) throws IOException {
diff --git a/src/main/java/org/bukkit/craftbukkit/Main.java b/src/main/java/org/bukkit/craftbukkit/Main.java
index 549d01337e9a89b356287567db101de383d45c9c..234f1bf8be8838e1b10672c3209b9dde68114f2b 100644
index 549d01337e9a89b356287567db101de383d45c9c..90d6650aa37247f3907f6bcf2fe5201cac4e05ea 100644
--- a/src/main/java/org/bukkit/craftbukkit/Main.java
+++ b/src/main/java/org/bukkit/craftbukkit/Main.java
@@ -143,7 +143,7 @@ public class Main {

this.acceptsAll(Main.asList("noconsole"), "Disables the console");

- this.acceptsAll(Main.asList("v", "version"), "Show the CraftBukkit Version");
+ this.acceptsAll(Main.asList("v", "version"), "Show the " + io.papermc.paper.ServerBuildInfo.buildInfo().brandName() + " Version"); // Plazma - Fork-friendly Rebranding
+ this.acceptsAll(Main.asList("v", "version"), "Show the " + io.papermc.paper.ServerBrandConstants.BRAND_NAME + " Version"); // Plazma - Fork-friendly Rebranding

this.acceptsAll(Main.asList("demo"), "Demo mode");

Expand All @@ -401,7 +401,7 @@ index 549d01337e9a89b356287567db101de383d45c9c..234f1bf8be8838e1b10672c3209b9dde
.withRequiredArg()
.ofType(String.class)
- .defaultsTo("Unknown Server")
+ .defaultsTo("A " + io.papermc.paper.ServerBuildInfo.buildInfo().brandName() + " Server") // Plazma - Fork-friendly Rebranding
+ .defaultsTo("A " + io.papermc.paper.ServerBrandConstants.BRAND_NAME + " Server") // Plazma - Fork-friendly Rebranding
.describedAs("Name");
// Paper end
}
Expand Down
4 changes: 2 additions & 2 deletions patches/server/0006-Plazma-Configurations.patch
Original file line number Diff line number Diff line change
Expand Up @@ -719,11 +719,11 @@ index 54c42f43981aee3da869343b078775fd39994b9e..58878900a1985d4dd23104ac594d5236
public void restart() {
org.spigotmc.RestartCommand.restart();
diff --git a/src/main/java/org/bukkit/craftbukkit/Main.java b/src/main/java/org/bukkit/craftbukkit/Main.java
index 234f1bf8be8838e1b10672c3209b9dde68114f2b..f84266bca823be3fe7d26ac59b181424e1e307ef 100644
index 90d6650aa37247f3907f6bcf2fe5201cac4e05ea..24c3914ba4f144a2e43c17e98373b7a4ce1f6217 100644
--- a/src/main/java/org/bukkit/craftbukkit/Main.java
+++ b/src/main/java/org/bukkit/craftbukkit/Main.java
@@ -197,6 +197,14 @@ public class Main {
.defaultsTo("A " + io.papermc.paper.ServerBuildInfo.buildInfo().brandName() + " Server") // Plazma - Fork-friendly Rebranding
.defaultsTo("A " + io.papermc.paper.ServerBrandConstants.BRAND_NAME + " Server") // Plazma - Fork-friendly Rebranding
.describedAs("Name");
// Paper end
+
Expand Down

0 comments on commit e6586da

Please sign in to comment.