-
-
Notifications
You must be signed in to change notification settings - Fork 49
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
504935f
commit b80c8b1
Showing
1 changed file
with
54 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 | ||
From: Dreeam <61569423+Dreeam-qwq@users.noreply.github.com> | ||
Date: Thu, 4 Jul 2024 19:47:01 +0800 | ||
Subject: [PATCH] Fix Nova compatibility | ||
|
||
By setting server brand to Purpur to be compatible with Nova plugin | ||
|
||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java | ||
index 15c3d62262a589844dbaa8ac357402aa592cd351..5823a3fa71850b38cb00b869e597c2fabc8d4117 100644 | ||
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java | ||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java | ||
@@ -671,6 +671,12 @@ public final class CraftServer implements Server { | ||
|
||
@Override | ||
public String getVersion() { | ||
+ // Leaf start - Fix Nova compatibility | ||
+ if (org.dreeam.leaf.config.modules.misc.FixNovaCompatibility.enabled) { | ||
+ return "git-Purpur-\"0000000\" (MC: " + this.console.getServerVersion() + ")"; | ||
+ } | ||
+ // Leaf end - Fix Nova compatibility | ||
+ | ||
return this.serverVersion + " (MC: " + this.console.getServerVersion() + ")"; | ||
} | ||
|
||
diff --git a/src/main/java/org/dreeam/leaf/config/modules/misc/FixNovaCompatibility.java b/src/main/java/org/dreeam/leaf/config/modules/misc/FixNovaCompatibility.java | ||
new file mode 100644 | ||
index 0000000000000000000000000000000000000000..fb13c33172b530c080a6028241bb6f5efd91cdaf | ||
--- /dev/null | ||
+++ b/src/main/java/org/dreeam/leaf/config/modules/misc/FixNovaCompatibility.java | ||
@@ -0,0 +1,24 @@ | ||
+package org.dreeam.leaf.config.modules.misc; | ||
+ | ||
+import org.dreeam.leaf.config.ConfigInfo; | ||
+import org.dreeam.leaf.config.EnumConfigCategory; | ||
+import org.dreeam.leaf.config.IConfigModule; | ||
+ | ||
+public class FixNovaCompatibility implements IConfigModule { | ||
+ | ||
+ @Override | ||
+ public EnumConfigCategory getCategory() { | ||
+ return EnumConfigCategory.MISC; | ||
+ } | ||
+ | ||
+ @Override | ||
+ public String getBaseName() { | ||
+ return "fix_nova_compatibility"; | ||
+ } | ||
+ | ||
+ @ConfigInfo(baseName = "enabled", comments = """ | ||
+ Set the server brand to Purpur if enabled. | ||
+ Don't enable this unless you have to use Nova | ||
+ """) | ||
+ public static boolean enabled = false; | ||
+} |