[Purpur Changes] PlazmaMC/Purpur@ceeec1c: work PlazmaMC/Purpur@e8f8f93: Updated Upstream (Paper, Pufferfish) [Paper Changes] PaperMC/Paper@f175193: Expose server build information (#10729) PaperMC/Paper@d8d59e0: Fix NPE sending resource pack without prompt PaperMC/Paper@5a9afbe: Fixes issues in the suppress dismount cancellation patch (#10735) PaperMC/Paper@0ad09de: Make PaperSimplePluginClassLoader show class which is not found PaperMC/Paper@b3b3406: fix CompassMeta not being correct (#10737) PaperMC/Paper@591521e: Check for more correct profile validation (#10730) PaperMC/Paper@7d2e5c3: Add an 'empty' RecipeChoice for certain ingredient slots (#10710) PaperMC/Paper@9bf4855: Add a better warning message than "Server performance will be affected" for CommandRegisteredEvent use (#10754) PaperMC/Paper@66cb880: Remove ThreadedWorldUpgrader patch PaperMC/Paper@980cff9: Fix compile PaperMC/Paper@d3ffa62: fix default item attributes PaperMC/Paper@b149584: Always show command exception stack traces in logs (#10766) PaperMC/Paper@a9201d4: [ci skip] Move logic in our patches to ItemType/BlockType (#10772) PaperMC/Paper@3de408e: Fix equipment slot and group API (#10767) PaperMC/Paper@d408381: Print CommandRegisteredEvent deprecation warnings again (#10756) PaperMC/Paper@6de7a1f: Improve default item attributes API (#10765) PaperMC/Paper@2a90732: Remove incorrect logic for Fireball#setVelocity (#10764) PaperMC/Paper@5e7b65a: Allow using PluginLoader classpath API from Bukkit plugins (#10758) PaperMC/Paper@3004717: Do not re-wrap vanilla goals (#10751) PaperMC/Paper@377733d: Use getter/setter on Mob for equipment drop chances (#10780) PaperMC/Paper@dff591d: Allow to define new map cursor types (#10782) PaperMC/Paper@4fd3ac0: [ci skip] Update Player#getListeningPluginChannels Jdoc (#10778) PaperMC/Paper@535dca5: Fix a few issues with ItemMeta (#10740) PaperMC/Paper@26e90b9: Fix CraftMetaBlockState for data components (#10731) PaperMC/Paper@f0bd0cc: Expose anvil cost in the API (#10682) PaperMC/Paper@41bee55: Fix NPE for color-related metas PaperMC/Paper@4e10fad: reset meta block state on BlockStateMeta#setBlockState
121 lines
6.7 KiB
Diff
121 lines
6.7 KiB
Diff
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
From: AlphaKR93 <dev@alpha93.kr>
|
|
Date: Tue, 14 May 2024 18:36:30 +0900
|
|
Subject: [PATCH] Rebrand
|
|
|
|
|
|
diff --git a/MIT.txt b/MIT.txt
|
|
new file mode 100644
|
|
index 0000000000000000000000000000000000000000..67d405764ed68083d0164b1af0eabc0af7f6efea
|
|
--- /dev/null
|
|
+++ b/MIT.txt
|
|
@@ -0,0 +1,21 @@
|
|
+The MIT License (MIT)
|
|
+
|
|
+Copyright (c) 2024 Paper Contributors
|
|
+
|
|
+Permission is hereby granted, free of charge, to any person obtaining
|
|
+a copy of this software and associated documentation files (the "Software"),
|
|
+to deal in the Software without restriction, including without limitation
|
|
+the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
|
+and/or sell copies of the Software, and to permit persons to whom
|
|
+the Software is furnished to do so, subject to the following conditions:
|
|
+
|
|
+The above copyright notice and this permission notice shall be included
|
|
+in all copies or substantial portions of the Software.
|
|
+
|
|
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
|
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
|
|
+WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE
|
|
+AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
|
|
+BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
|
|
+AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF
|
|
+OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
diff --git a/src/main/java/co/aikar/timings/TimingHandler.java b/src/main/java/co/aikar/timings/TimingHandler.java
|
|
index 199789d56d22fcb1b77ebd56805cc28aa5a5ab0a..3b3bcfa6fa2dbcc7fef899cc7570da097437ab3a 100644
|
|
--- a/src/main/java/co/aikar/timings/TimingHandler.java
|
|
+++ b/src/main/java/co/aikar/timings/TimingHandler.java
|
|
@@ -127,7 +127,7 @@ class TimingHandler implements Timing {
|
|
while ((last = TIMING_STACK.removeLast()) != this) {
|
|
last.timingDepth = 0;
|
|
if ("Minecraft".equalsIgnoreCase(last.identifier.group)) {
|
|
- Logger.getGlobal().log(Level.SEVERE, "TIMING_STACK_CORRUPTION - Look above this for any errors and report this to Paper unless it has a plugin in the stack trace (" + last.identifier + " did not stopTiming)");
|
|
+ Logger.getGlobal().log(Level.SEVERE, "TIMING_STACK_CORRUPTION - Look above this for any errors and report this to " + io.papermc.paper.ServerBuildInfo.buildInfo().brandName() + " unless it has a plugin in the stack trace (" + last.identifier + " did not stopTiming)");
|
|
} else {
|
|
Logger.getGlobal().log(Level.SEVERE, "TIMING_STACK_CORRUPTION - Report this to the plugin " + last.identifier.group + " (Look for errors above this in the logs) (" + last.identifier + " did not stopTiming)", new Throwable());
|
|
}
|
|
diff --git a/src/main/java/io/papermc/paper/ServerBuildInfo.java b/src/main/java/io/papermc/paper/ServerBuildInfo.java
|
|
index 7107eabf02d9d9b69d97c978ba421ad52031ec3f..098125a57409b480f045c3a8c3b58db74a6605f3 100644
|
|
--- a/src/main/java/io/papermc/paper/ServerBuildInfo.java
|
|
+++ b/src/main/java/io/papermc/paper/ServerBuildInfo.java
|
|
@@ -25,6 +25,29 @@ public interface ServerBuildInfo {
|
|
Key BRAND_PURPUR_ID = Key.key("purpurmc", "purpur");
|
|
// Purpur end
|
|
|
|
+ // Plazma start - Rebranding
|
|
+ /**
|
|
+ * The brand id for Plazma.
|
|
+ */
|
|
+ Key BRAND_PLAZMA_ID = Key.key("plazmamc", "plazma");
|
|
+
|
|
+ // For those who fork Plazma - please add the new branding key here
|
|
+
|
|
+ /**
|
|
+ * The brand id of the server.
|
|
+ */
|
|
+ Key BRAND_ID = BRAND_PLAZMA_ID;
|
|
+
|
|
+ /**
|
|
+ * Supported brands of the server.
|
|
+ */
|
|
+ java.util.List<Key> SUPPORTED_BRANDS = java.util.Arrays.asList(
|
|
+ BRAND_PAPER_ID,
|
|
+ BRAND_PURPUR_ID,
|
|
+ BRAND_PLAZMA_ID
|
|
+ );
|
|
+ // Plazma end - Rebranding
|
|
+
|
|
/**
|
|
* Gets the {@code ServerBuildInfo}.
|
|
*
|
|
diff --git a/src/main/java/org/bukkit/command/defaults/VersionCommand.java b/src/main/java/org/bukkit/command/defaults/VersionCommand.java
|
|
index 3d29c47ac0620af82d990faf5dfc266c6f0235f1..0dd22efb7f318867d0f099e336505d2830883745 100644
|
|
--- a/src/main/java/org/bukkit/command/defaults/VersionCommand.java
|
|
+++ b/src/main/java/org/bukkit/command/defaults/VersionCommand.java
|
|
@@ -258,7 +258,7 @@ public class VersionCommand extends BukkitCommand {
|
|
// Purpur start
|
|
int distance = getVersionFetcher().distance();
|
|
final Component message = Component.join(net.kyori.adventure.text.JoinConfiguration.separator(Component.newline()),
|
|
- ChatColor.parseMM("<grey>Current Purpur Version: %s%s*", distance == 0 ? "<green>" : distance > 0 ? "<yellow>" : "<red>", Bukkit.getVersion()),
|
|
+ ChatColor.parseMM("<grey>Current " + io.papermc.paper.ServerBuildInfo.buildInfo().brandName() + " Version: %s%s*", distance == 0 ? "<green>" : distance > 0 ? "<yellow>" : "<red>", Bukkit.getVersion()),
|
|
// Purpur end
|
|
msg
|
|
);
|
|
@@ -281,6 +281,7 @@ public class VersionCommand extends BukkitCommand {
|
|
}
|
|
}
|
|
|
|
+ /* // Plazma - Fork-friendly Rebranding
|
|
private static int getDistance(@NotNull String repo, @NotNull String hash) {
|
|
try {
|
|
BufferedReader reader = Resources.asCharSource(
|
|
@@ -301,4 +302,5 @@ public class VersionCommand extends BukkitCommand {
|
|
return -1;
|
|
}
|
|
}
|
|
+ */ // Plazma - Fork-friendly Rebranding
|
|
}
|
|
diff --git a/src/main/java/org/bukkit/plugin/EventExecutor.java b/src/main/java/org/bukkit/plugin/EventExecutor.java
|
|
index 60e086be70529e0804280b24a2a3e7ae72d8d363..dcf1d53af919e94a6947bc3f81121bd4fad1a163 100644
|
|
--- a/src/main/java/org/bukkit/plugin/EventExecutor.java
|
|
+++ b/src/main/java/org/bukkit/plugin/EventExecutor.java
|
|
@@ -54,7 +54,7 @@ public interface EventExecutor {
|
|
if (m.getReturnType() != Void.TYPE) {
|
|
final org.bukkit.plugin.java.JavaPlugin plugin = org.bukkit.plugin.java.JavaPlugin.getProvidingPlugin(m.getDeclaringClass());
|
|
org.bukkit.Bukkit.getLogger().warning("@EventHandler method " + m.getDeclaringClass().getName() + (Modifier.isStatic(m.getModifiers()) ? '.' : '#') + m.getName()
|
|
- + " returns non-void type " + m.getReturnType().getName() + ". This is unsupported behavior and will no longer work in a future version of Paper."
|
|
+ + " returns non-void type " + m.getReturnType().getName() + ". This is unsupported behavior and will no longer work in a future version of " + io.papermc.paper.ServerBuildInfo.buildInfo().brandName() + "." // Plazma - Fork-friendly Rebranding
|
|
+ " This should be reported to the developers of " + plugin.getPluginMeta().getDisplayName() + " (" + String.join(",", plugin.getPluginMeta().getAuthors()) + ')');
|
|
}
|
|
if (Modifier.isStatic(m.getModifiers())) {
|