391 lines
32 KiB
Diff
391 lines
32 KiB
Diff
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
From: AlphaKR93 <alphakr93@outlook.com>
|
|
Date: Wed, 21 Dec 2022 19:31:24 +0900
|
|
Subject: [PATCH] Rebrand
|
|
|
|
|
|
diff --git a/build.gradle.kts b/build.gradle.kts
|
|
index 9c01005751c0088f560f96401cdfdebbbda4e7ec..46fda579a95f9ab92a1ba61cad8218024a722208 100644
|
|
--- a/build.gradle.kts
|
|
+++ b/build.gradle.kts
|
|
@@ -7,7 +7,7 @@ plugins {
|
|
}
|
|
|
|
dependencies {
|
|
- implementation(project(":purpur-api")) // Purpur
|
|
+ implementation(project(":plazma-api")) // Purpur
|
|
implementation("io.papermc.paper:paper-mojangapi:1.19.4-R0.1-SNAPSHOT") // Purpur
|
|
// Paper start
|
|
implementation("org.jline:jline-terminal-jansi:3.21.0")
|
|
@@ -81,7 +81,7 @@ tasks.jar {
|
|
attributes(
|
|
"Main-Class" to "org.bukkit.craftbukkit.Main",
|
|
"Implementation-Title" to "CraftBukkit",
|
|
- "Implementation-Version" to "git-Purpur-$implementationVersion", // Pufferfish // Purpur
|
|
+ "Implementation-Version" to "git-Plazma-$implementationVersion", // Pufferfish // Purpur // Plazma
|
|
"Implementation-Vendor" to date, // Paper
|
|
"Specification-Title" to "Bukkit",
|
|
"Specification-Version" to project.version,
|
|
diff --git a/src/main/java/com/destroystokyo/paper/Metrics.java b/src/main/java/com/destroystokyo/paper/Metrics.java
|
|
index 8cde30544e14f8fc2dac32966ae3c21f8cf3a551..7d80d2cf5d607d6051e99e4b08bc1b76098a79da 100644
|
|
--- a/src/main/java/com/destroystokyo/paper/Metrics.java
|
|
+++ b/src/main/java/com/destroystokyo/paper/Metrics.java
|
|
@@ -593,7 +593,7 @@ public class Metrics {
|
|
boolean logFailedRequests = config.getBoolean("logFailedRequests", false);
|
|
// Only start Metrics, if it's enabled in the config
|
|
if (config.getBoolean("enabled", true)) {
|
|
- Metrics metrics = new Metrics("Purpur", serverUUID, logFailedRequests, Bukkit.getLogger()); // Pufferfish // Purpur
|
|
+ Metrics metrics = new Metrics("Plazma", serverUUID, logFailedRequests, Bukkit.getLogger()); // Pufferfish // Purpur // Plazma
|
|
|
|
metrics.addCustomChart(new Metrics.SimplePie("minecraft_version", () -> {
|
|
String minecraftVersion = Bukkit.getVersion();
|
|
@@ -603,7 +603,7 @@ public class Metrics {
|
|
|
|
metrics.addCustomChart(new Metrics.SingleLineChart("players", () -> Bukkit.getOnlinePlayers().size()));
|
|
metrics.addCustomChart(new Metrics.SimplePie("online_mode", () -> Bukkit.getOnlineMode() ? "online" : (io.papermc.paper.configuration.GlobalConfiguration.get().proxies.isProxyOnlineMode() ? "bungee" : "offline"))); // Purpur
|
|
- metrics.addCustomChart(new Metrics.SimplePie("purpur_version", () -> (org.bukkit.craftbukkit.Main.class.getPackage().getImplementationVersion() != null) ? org.bukkit.craftbukkit.Main.class.getPackage().getImplementationVersion() : "unknown")); // Purpur
|
|
+ metrics.addCustomChart(new Metrics.SimplePie("plazma_version", () -> (org.bukkit.craftbukkit.Main.class.getPackage().getImplementationVersion() != null) ? org.bukkit.craftbukkit.Main.class.getPackage().getImplementationVersion() : "unknown")); // Purpur // Plazma
|
|
|
|
metrics.addCustomChart(new Metrics.DrilldownPie("java_version", () -> {
|
|
Map<String, Map<String, Integer>> map = new HashMap<>();
|
|
diff --git a/src/main/java/com/destroystokyo/paper/PaperVersionFetcher.java b/src/main/java/com/destroystokyo/paper/PaperVersionFetcher.java
|
|
index 462a6eed350fd660ddaf25d567bb6e97b77d0b2b..fec95437c1ad602f64c4d4d02c276199f27babbd 100644
|
|
--- a/src/main/java/com/destroystokyo/paper/PaperVersionFetcher.java
|
|
+++ b/src/main/java/com/destroystokyo/paper/PaperVersionFetcher.java
|
|
@@ -20,7 +20,7 @@ import java.util.stream.StreamSupport;
|
|
public class PaperVersionFetcher implements VersionFetcher {
|
|
private static final java.util.regex.Pattern VER_PATTERN = java.util.regex.Pattern.compile("^([0-9\\.]*)\\-.*R"); // R is an anchor, will always give '-R' at end
|
|
// Purpur start
|
|
- private static final String DOWNLOAD_PAGE = "https://purpurmc.org/downloads";
|
|
+ private static final String DOWNLOAD_PAGE = "https://github.com/PlazmaMC/Plazma/releases"; // Plazma
|
|
private static int distance = -2; public int distance() { return distance; }
|
|
// Purpur end
|
|
private static @Nullable String mcVer;
|
|
@@ -33,8 +33,8 @@ public class PaperVersionFetcher implements VersionFetcher {
|
|
@Nonnull
|
|
@Override
|
|
public Component getVersionMessage(@Nonnull String serverVersion) {
|
|
- String[] parts = serverVersion.substring("git-Purpur-".length()).split("[-\\s]"); // Purpur
|
|
- final Component updateMessage = getUpdateStatusMessage("PurpurMC/Purpur", "ver/" + getMinecraftVersion(), parts[0]); // Purpur
|
|
+ String[] parts = serverVersion.substring("git-Plazma-".length()).split("[-\\s]"); // Purpur // Plazma
|
|
+ final Component updateMessage = getUpdateStatusMessage("PlazmaMC/Plazma", "ver/" + getMinecraftVersion(), parts[0]); // Purpur // Plazma
|
|
final Component history = getHistory();
|
|
|
|
return history != null ? Component.join(net.kyori.adventure.text.JoinConfiguration.separator(Component.newline()), history, updateMessage) : updateMessage; // Purpur
|
|
@@ -47,7 +47,7 @@ public class PaperVersionFetcher implements VersionFetcher {
|
|
String result = matcher.group();
|
|
mcVer = result.substring(0, result.length() - 2); // strip 'R' anchor and trailing '-'
|
|
} else {
|
|
- org.bukkit.Bukkit.getLogger().warning("Unable to match version to pattern! Report to Purpur!"); // Purpur
|
|
+ org.bukkit.Bukkit.getLogger().warning("Unable to match version to pattern! Report to Plazma!"); // Purpur // Plazma
|
|
org.bukkit.Bukkit.getLogger().warning("Pattern: " + VER_PATTERN.toString());
|
|
org.bukkit.Bukkit.getLogger().warning("Version: " + org.bukkit.Bukkit.getBukkitVersion());
|
|
}
|
|
@@ -57,6 +57,7 @@ public class PaperVersionFetcher implements VersionFetcher {
|
|
}
|
|
|
|
private static Component getUpdateStatusMessage(@Nonnull String repo, @Nonnull String branch, @Nonnull String versionInfo) {
|
|
+ /* // Plazma - Disable CI Checking
|
|
//int distance; // Purpur - use field
|
|
try {
|
|
int jenkinsBuild = Integer.parseInt(versionInfo);
|
|
@@ -65,6 +66,11 @@ public class PaperVersionFetcher implements VersionFetcher {
|
|
versionInfo = versionInfo.replace("\"", "");
|
|
distance = fetchDistanceFromGitHub(repo, branch, versionInfo);
|
|
}
|
|
+ // Plazma start - Disable CI Checking
|
|
+ */
|
|
+ versionInfo = versionInfo.replace("\"", ""); // Plazma
|
|
+ distance = fetchDistanceFromGitHub(repo, branch, versionInfo); // Plazma
|
|
+ // Plazma end
|
|
|
|
switch (distance) {
|
|
case -1:
|
|
@@ -83,6 +89,7 @@ public class PaperVersionFetcher implements VersionFetcher {
|
|
}
|
|
}
|
|
|
|
+ /* // Plazma - Disable CI Checking
|
|
private static int fetchDistanceFromSiteApi(int jenkinsBuild, @Nullable String siteApiVersion) {
|
|
if (siteApiVersion == null) { return -1; }
|
|
try {
|
|
@@ -102,6 +109,7 @@ public class PaperVersionFetcher implements VersionFetcher {
|
|
return -1;
|
|
}
|
|
}
|
|
+ */ // Plazma - Disable CI Checking
|
|
|
|
// Contributed by Techcable <Techcable@outlook.com> in GH-65
|
|
private static int fetchDistanceFromGitHub(@Nonnull String repo, @Nonnull String branch, @Nonnull String hash) {
|
|
diff --git a/src/main/java/com/destroystokyo/paper/console/PaperConsole.java b/src/main/java/com/destroystokyo/paper/console/PaperConsole.java
|
|
index 3cb56595822799926a8141e60a42f5d1edfc6de5..19d1d136fc28d6c114f6bc44c6450d2df51c3cb9 100644
|
|
--- a/src/main/java/com/destroystokyo/paper/console/PaperConsole.java
|
|
+++ b/src/main/java/com/destroystokyo/paper/console/PaperConsole.java
|
|
@@ -17,7 +17,7 @@ public final class PaperConsole extends SimpleTerminalConsole {
|
|
@Override
|
|
protected LineReader buildReader(LineReaderBuilder builder) {
|
|
builder
|
|
- .appName("Purpur") // Purpur
|
|
+ .appName("Plazma") // Purpur // Plazma
|
|
.variable(LineReader.HISTORY_FILE, java.nio.file.Paths.get(".console_history"))
|
|
.completer(new ConsoleCommandCompleter(this.server))
|
|
.option(LineReader.Option.COMPLETE_IN_WORD, true);
|
|
diff --git a/src/main/java/net/minecraft/CrashReport.java b/src/main/java/net/minecraft/CrashReport.java
|
|
index b5b6657e52e4f7a630229bd3ba433438af293e22..c468733f44ccb3ff4ba3c20921a4ec52658f0689 100644
|
|
--- a/src/main/java/net/minecraft/CrashReport.java
|
|
+++ b/src/main/java/net/minecraft/CrashReport.java
|
|
@@ -35,7 +35,7 @@ public class CrashReport {
|
|
io.papermc.paper.util.StacktraceDeobfuscator.INSTANCE.deobfuscateThrowable(cause); // Paper
|
|
this.title = message;
|
|
this.exception = cause;
|
|
- this.systemReport.setDetail("CraftBukkit Information", new org.bukkit.craftbukkit.CraftCrashReport()); // CraftBukkit
|
|
+ this.systemReport.setDetail("Plazma Information", new org.bukkit.craftbukkit.CraftCrashReport()); // CraftBukkit // Plazma
|
|
}
|
|
|
|
public String getTitle() {
|
|
@@ -125,7 +125,7 @@ public class CrashReport {
|
|
stringbuilder.append("---- Minecraft Crash Report ----\n");
|
|
// 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 PLAZMA INSTEAD!"); // Plazma
|
|
// Purpur end
|
|
stringbuilder.append("// ");
|
|
stringbuilder.append(CrashReport.getErrorComment());
|
|
diff --git a/src/main/java/net/minecraft/server/Main.java b/src/main/java/net/minecraft/server/Main.java
|
|
index cdbf10339a8e8846a8c364de483a0ccd95cd225a..1a125a0a2bbcc1e3e54746ec97abe24c53f69819 100644
|
|
--- a/src/main/java/net/minecraft/server/Main.java
|
|
+++ b/src/main/java/net/minecraft/server/Main.java
|
|
@@ -81,6 +81,17 @@ public class Main {
|
|
|
|
@DontObfuscate
|
|
public static void main(final OptionSet optionset) { // CraftBukkit - replaces main(String[] astring)
|
|
+ // Plazma start - Branding
|
|
+ System.out.println("""
|
|
+ \033[38;2;236;61;151m┏\033[38;2;236;61;157m━\033[38;2;237;62;163m━\033[38;2;237;62;169m━\033[38;2;238;62;175m━\033[38;2;238;63;181m━\033[38;2;239;63;187m┓\033[38;2;239;63;193m \033[38;2;239;64;200m┏\033[38;2;240;64;206m━\033[38;2;240;64;212m┓\033[38;2;241;65;218m \033[38;2;241;65;224m \033[38;2;242;65;230m \033[38;2;242;66;236m \033[38;2;242;66;242m \033[38;2;237;66;243m \033[38;2;232;67;243m┏\033[38;2;227;67;244m━\033[38;2;221;67;244m━\033[38;2;216;68;244m━\033[38;2;211;68;245m━\033[38;2;205;69;245m┓\033[38;2;200;69;246m \033[38;2;195;69;246m┏\033[38;2;189;70;246m━\033[38;2;184;70;247m━\033[38;2;179;70;247m━\033[38;2;173;71;247m━\033[38;2;168;71;248m━\033[38;2;163;72;248m━\033[38;2;157;72;249m┓\033[38;2;152;72;249m┏\033[38;2;147;73;249m━\033[38;2;141;73;250m━\033[38;2;136;74;250m┓\033[38;2;131;74;250m \033[38;2;125;74;251m \033[38;2;120;75;251m \033[38;2;115;75;251m┏\033[38;2;109;76;252m━\033[38;2;104;76;252m━\033[38;2;99;77;252m┓\033[38;2;94;77;253m \033[38;2;88;77;253m┏\033[38;2;83;78;253m━\033[38;2;78;79;254m━\033[38;2;79;85;254m━\033[38;2;79;91;254m━\033[38;2;80;97;255m┓\033[38;2;80;103;255m\s
|
|
+ \033[38;2;236;61;151m┃\033[38;2;236;61;157m┏\033[38;2;237;62;163m━\033[38;2;237;62;169m━\033[38;2;238;62;175m━\033[38;2;238;63;181m┓\033[38;2;239;63;187m┗\033[38;2;239;63;193m┓\033[38;2;239;64;200m┃\033[38;2;240;64;206m \033[38;2;240;64;212m┃\033[38;2;241;65;218m \033[38;2;241;65;224m \033[38;2;242;65;230m \033[38;2;242;66;236m \033[38;2;242;66;242m \033[38;2;237;66;243m┏\033[38;2;232;67;243m┛\033[38;2;227;67;244m┏\033[38;2;221;67;244m━\033[38;2;216;68;244m━\033[38;2;211;68;245m┓\033[38;2;205;69;245m┗\033[38;2;200;69;246m┓\033[38;2;195;69;246m┗\033[38;2;189;70;246m━\033[38;2;184;70;247m━\033[38;2;179;70;247m┓\033[38;2;173;71;247m \033[38;2;168;71;248m \033[38;2;163;72;248m┏\033[38;2;157;72;249m┛\033[38;2;152;72;249m┃\033[38;2;147;73;249m \033[38;2;141;73;250m \033[38;2;136;74;250m┗\033[38;2;131;74;250m┓\033[38;2;125;74;251m \033[38;2;120;75;251m┏\033[38;2;115;75;251m┛\033[38;2;109;76;252m \033[38;2;104;76;252m \033[38;2;99;77;252m┃\033[38;2;94;77;253m┏\033[38;2;88;77;253m┛\033[38;2;83;78;253m┏\033[38;2;78;79;254m━\033[38;2;79;85;254m━\033[38;2;79;91;254m┓\033[38;2;80;97;255m┗\033[38;2;80;103;255m┓
|
|
+ \033[38;2;236;61;151m┃\033[38;2;236;61;157m┗\033[38;2;237;62;163m━\033[38;2;237;62;169m━\033[38;2;238;62;175m━\033[38;2;238;63;181m┛\033[38;2;239;63;187m┏\033[38;2;239;63;193m┛\033[38;2;239;64;200m┃\033[38;2;240;64;206m \033[38;2;240;64;212m┃\033[38;2;241;65;218m \033[38;2;241;65;224m \033[38;2;242;65;230m \033[38;2;242;66;236m \033[38;2;242;66;242m \033[38;2;237;66;243m┃\033[38;2;232;67;243m \033[38;2;227;67;244m┗\033[38;2;221;67;244m━\033[38;2;216;68;244m━\033[38;2;211;68;245m┛\033[38;2;205;69;245m \033[38;2;200;69;246m┃\033[38;2;195;69;246m \033[38;2;189;70;246m \033[38;2;184;70;247m┏\033[38;2;179;70;247m┛\033[38;2;173;71;247m \033[38;2;168;71;248m┏\033[38;2;163;72;248m┛\033[38;2;157;72;249m \033[38;2;152;72;249m┃\033[38;2;147;73;249m \033[38;2;141;73;250m┏\033[38;2;136;74;250m┓\033[38;2;131;74;250m┗\033[38;2;125;74;251m━\033[38;2;120;75;251m┛\033[38;2;115;75;251m┏\033[38;2;109;76;252m┓\033[38;2;104;76;252m \033[38;2;99;77;252m┃\033[38;2;94;77;253m┃\033[38;2;88;77;253m \033[38;2;83;78;253m┗\033[38;2;78;79;254m━\033[38;2;79;85;254m━\033[38;2;79;91;254m┛\033[38;2;80;97;255m \033[38;2;80;103;255m┃
|
|
+ \033[38;2;236;61;151m┃\033[38;2;236;61;157m \033[38;2;237;62;163m┏\033[38;2;237;62;169m━\033[38;2;238;62;175m━\033[38;2;238;63;181m━\033[38;2;239;63;187m┛\033[38;2;239;63;193m \033[38;2;239;64;200m┃\033[38;2;240;64;206m \033[38;2;240;64;212m┃\033[38;2;241;65;218m \033[38;2;241;65;224m \033[38;2;242;65;230m \033[38;2;242;66;236m \033[38;2;242;66;242m \033[38;2;237;66;243m┃\033[38;2;232;67;243m \033[38;2;227;67;244m┏\033[38;2;221;67;244m━\033[38;2;216;68;244m━\033[38;2;211;68;245m┓\033[38;2;205;69;245m \033[38;2;200;69;246m┃\033[38;2;195;69;246m \033[38;2;189;70;246m┏\033[38;2;184;70;247m┛\033[38;2;179;70;247m \033[38;2;173;71;247m┏\033[38;2;168;71;248m┛\033[38;2;163;72;248m \033[38;2;157;72;249m \033[38;2;152;72;249m┃\033[38;2;147;73;249m \033[38;2;141;73;250m┃\033[38;2;136;74;250m┗\033[38;2;131;74;250m┓\033[38;2;125;74;251m \033[38;2;120;75;251m┏\033[38;2;115;75;251m┛\033[38;2;109;76;252m┃\033[38;2;104;76;252m \033[38;2;99;77;252m┃\033[38;2;94;77;253m┃\033[38;2;88;77;253m \033[38;2;83;78;253m┏\033[38;2;78;79;254m━\033[38;2;79;85;254m━\033[38;2;79;91;254m┓\033[38;2;80;97;255m \033[38;2;80;103;255m┃
|
|
+ \033[38;2;236;61;151m┃\033[38;2;236;61;157m \033[38;2;237;62;163m┃\033[38;2;237;62;169m \033[38;2;238;62;175m \033[38;2;238;63;181m \033[38;2;239;63;187m \033[38;2;239;63;193m \033[38;2;239;64;200m┃\033[38;2;240;64;206m \033[38;2;240;64;212m┗\033[38;2;241;65;218m━\033[38;2;241;65;224m━\033[38;2;242;65;230m━\033[38;2;242;66;236m━\033[38;2;242;66;242m┓\033[38;2;237;66;243m┃\033[38;2;232;67;243m \033[38;2;227;67;244m┃\033[38;2;221;67;244m \033[38;2;216;68;244m \033[38;2;211;68;245m┃\033[38;2;205;69;245m \033[38;2;200;69;246m┃\033[38;2;195;69;246m┏\033[38;2;189;70;246m┛\033[38;2;184;70;247m \033[38;2;179;70;247m \033[38;2;173;71;247m┗\033[38;2;168;71;248m━\033[38;2;163;72;248m━\033[38;2;157;72;249m┓\033[38;2;152;72;249m┃\033[38;2;147;73;249m \033[38;2;141;73;250m┃\033[38;2;136;74;250m \033[38;2;131;74;250m┗\033[38;2;125;74;251m━\033[38;2;120;75;251m┛\033[38;2;115;75;251m \033[38;2;109;76;252m┃\033[38;2;104;76;252m \033[38;2;99;77;252m┃\033[38;2;94;77;253m┃\033[38;2;88;77;253m \033[38;2;83;78;253m┃\033[38;2;78;79;254m \033[38;2;79;85;254m \033[38;2;79;91;254m┃\033[38;2;80;97;255m \033[38;2;80;103;255m┃
|
|
+ \033[38;2;236;61;151m┗\033[38;2;236;61;157m━\033[38;2;237;62;163m┛\033[38;2;237;62;169m \033[38;2;238;62;175m \033[38;2;238;63;181m \033[38;2;239;63;187m \033[38;2;239;63;193m \033[38;2;239;64;200m┗\033[38;2;240;64;206m━\033[38;2;240;64;212m━\033[38;2;241;65;218m━\033[38;2;241;65;224m━\033[38;2;242;65;230m━\033[38;2;242;66;236m━\033[38;2;242;66;242m┛\033[38;2;237;66;243m┗\033[38;2;232;67;243m━\033[38;2;227;67;244m┛\033[38;2;221;67;244m \033[38;2;216;68;244m \033[38;2;211;68;245m┗\033[38;2;205;69;245m━\033[38;2;200;69;246m┛\033[38;2;195;69;246m┗\033[38;2;189;70;246m━\033[38;2;184;70;247m━\033[38;2;179;70;247m━\033[38;2;173;71;247m━\033[38;2;168;71;248m━\033[38;2;163;72;248m━\033[38;2;157;72;249m┛\033[38;2;152;72;249m┗\033[38;2;147;73;249m━\033[38;2;141;73;250m┛\033[38;2;136;74;250m \033[38;2;131;74;250m \033[38;2;125;74;251m \033[38;2;120;75;251m \033[38;2;115;75;251m \033[38;2;109;76;252m┗\033[38;2;104;76;252m━\033[38;2;99;77;252m┛\033[38;2;94;77;253m┗\033[38;2;88;77;253m━\033[38;2;83;78;253m┛\033[38;2;78;79;254m \033[38;2;79;85;254m \033[38;2;79;91;254m┗\033[38;2;80;97;255m━\033[38;2;80;103;255m┛
|
|
+ """);
|
|
+ LOGGER.warn("Warning! Plazma may cause unexpected problems, so be sure to test it thoroughly before using it on a public server.");
|
|
+ // Plazma end
|
|
SharedConstants.tryDetectVersion();
|
|
/* CraftBukkit start - Replace everything
|
|
OptionParser optionparser = new OptionParser();
|
|
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
|
|
index beb05039926e1fb7a656dfcd0c503f82db67fc46..615c456de68a20d0e95b30e124a2bdf46039408f 100644
|
|
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
|
|
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
|
|
@@ -930,7 +930,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
|
shutdownThread = Thread.currentThread();
|
|
org.spigotmc.WatchdogThread.doStop(); // Paper
|
|
if (!isSameThread()) {
|
|
- MinecraftServer.LOGGER.info("Stopping main thread (Ignore any thread death message you see! - DO NOT REPORT THREAD DEATH TO PURPUR)"); // Purpur
|
|
+ MinecraftServer.LOGGER.info("Stopping main thread (Ignore any thread death message you see! - DO NOT REPORT THREAD DEATH TO PLAZMA)"); // Purpur // Plazma
|
|
while (this.getRunningThread().isAlive()) {
|
|
this.getRunningThread().stop();
|
|
try {
|
|
diff --git a/src/main/java/net/minecraft/server/gui/MinecraftServerGui.java b/src/main/java/net/minecraft/server/gui/MinecraftServerGui.java
|
|
index 56cf3d5b8e365ce6b1ec88464d9079d774206755..9133e57b83c3348b5cd7a6b31f5ec380e8a12560 100644
|
|
--- a/src/main/java/net/minecraft/server/gui/MinecraftServerGui.java
|
|
+++ b/src/main/java/net/minecraft/server/gui/MinecraftServerGui.java
|
|
@@ -56,7 +56,7 @@ public class MinecraftServerGui extends JComponent {
|
|
;
|
|
}
|
|
|
|
- final JFrame jframe = new JFrame("Purpur Minecraft server"); // Purpur
|
|
+ final JFrame jframe = new JFrame("Plazma Minecraft server"); // Purpur // Plazma
|
|
final MinecraftServerGui servergui = new MinecraftServerGui(server);
|
|
|
|
jframe.setDefaultCloseOperation(2);
|
|
@@ -64,7 +64,7 @@ public class MinecraftServerGui extends JComponent {
|
|
jframe.pack();
|
|
jframe.setLocationRelativeTo((Component) null);
|
|
jframe.setVisible(true);
|
|
- jframe.setName("Purpur Minecraft server"); // Paper // Purpur
|
|
+ jframe.setName("Plazma Minecraft server"); // Paper // Purpur // Plazma
|
|
|
|
// Paper start - Add logo as frame image
|
|
try {
|
|
@@ -76,7 +76,7 @@ public class MinecraftServerGui extends JComponent {
|
|
jframe.addWindowListener(new WindowAdapter() {
|
|
public void windowClosing(WindowEvent windowevent) {
|
|
if (!servergui.isClosing.getAndSet(true)) {
|
|
- jframe.setTitle("Purpur Minecraft server - shutting down!"); // Purpur
|
|
+ jframe.setTitle("Plazma Minecraft server - shutting down!"); // Purpur // Plazma
|
|
server.halt(true);
|
|
servergui.runFinalizers();
|
|
}
|
|
diff --git a/src/main/java/net/minecraft/world/level/Level.java b/src/main/java/net/minecraft/world/level/Level.java
|
|
index b8001bca2a33ec1e60566948a651400418a6e9e7..92b440b24c6b083f81837611d08fbd6773a2a6e6 100644
|
|
--- a/src/main/java/net/minecraft/world/level/Level.java
|
|
+++ b/src/main/java/net/minecraft/world/level/Level.java
|
|
@@ -1041,7 +1041,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
|
|
TickingBlockEntity tickingblockentity = (TickingBlockEntity) this.blockEntityTickers.get(tileTickPosition);
|
|
// Spigot start
|
|
if (tickingblockentity == null) {
|
|
- this.getCraftServer().getLogger().severe("Spigot has detected a null entity and has removed it, preventing a crash");
|
|
+ this.getCraftServer().getLogger().severe("Plazma has detected a null entity and has removed it, preventing a crash"); // Plazma
|
|
tilesThisCycle--;
|
|
continue;
|
|
}
|
|
diff --git a/src/main/java/net/minecraft/world/level/chunk/storage/RegionFileStorage.java b/src/main/java/net/minecraft/world/level/chunk/storage/RegionFileStorage.java
|
|
index bd502ca721de0cab438d995efa00ad0554c0d2fe..d72f61f545c3929825e628607b85e0d25f79db1f 100644
|
|
--- a/src/main/java/net/minecraft/world/level/chunk/storage/RegionFileStorage.java
|
|
+++ b/src/main/java/net/minecraft/world/level/chunk/storage/RegionFileStorage.java
|
|
@@ -113,7 +113,7 @@ public class RegionFileStorage implements AutoCloseable {
|
|
|
|
// Paper start
|
|
private static void printOversizedLog(String msg, Path file, int x, int z) {
|
|
- org.apache.logging.log4j.LogManager.getLogger().fatal(msg + " (" + file.toString().replaceAll(".+[\\\\/]", "") + " - " + x + "," + z + ") Go clean it up to remove this message. /minecraft:tp " + (x<<4)+" 128 "+(z<<4) + " - DO NOT REPORT THIS TO PAPER - You may ask for help on Discord, but do not file an issue. These error messages can not be removed.");
|
|
+ org.apache.logging.log4j.LogManager.getLogger().fatal(msg + " (" + file.toString().replaceAll(".+[\\\\/]", "") + " - " + x + "," + z + ") Go clean it up to remove this message. /minecraft:tp " + (x<<4)+" 128 "+(z<<4) + " - DO NOT REPORT THIS TO PLAZMA - You may ask for help on Discord, but do not file an issue. These error messages can not be removed."); // Plazma
|
|
}
|
|
|
|
private static final int DEFAULT_SIZE_THRESHOLD = 1024 * 8;
|
|
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
|
index 3310828edcabd2c24e3200dcb89d4e8ebd82cf16..5e6952a9d4c1137dc3d720ee2c944d95d4628065 100644
|
|
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
|
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
|
@@ -262,7 +262,7 @@ import javax.annotation.Nullable; // Paper
|
|
import javax.annotation.Nonnull; // Paper
|
|
|
|
public final class CraftServer implements Server {
|
|
- private final String serverName = "Purpur"; // Paper // Pufferfish // Purpur
|
|
+ private final String serverName = "Plazma"; // Paper // Pufferfish // Purpur // Plazma
|
|
private final String serverVersion;
|
|
private final String bukkitVersion = Versioning.getBukkitVersion();
|
|
private final Logger logger = Logger.getLogger("Minecraft");
|
|
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
|
|
index 7ef5980f7321662aa7034a74c2f6926846425db9..00200576bad5a92c65df762239dbec9a6e9a239b 100644
|
|
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
|
|
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
|
|
@@ -884,7 +884,7 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity {
|
|
return EntityCategory.WATER;
|
|
}
|
|
|
|
- throw new UnsupportedOperationException("Unsupported monster type: " + type + ". This is a bug, report this to Purpur."); // Purpur
|
|
+ throw new UnsupportedOperationException("Unsupported monster type: " + type + ". This is a bug, report this to Plazma."); // Purpur // Plazma
|
|
}
|
|
|
|
@Override
|
|
diff --git a/src/main/java/org/bukkit/craftbukkit/scheduler/CraftScheduler.java b/src/main/java/org/bukkit/craftbukkit/scheduler/CraftScheduler.java
|
|
index 5402098dce0d64d3dceea51f248d7d366850a74f..c49bed43a34549936b5751678f2389c2d9a6e1ec 100644
|
|
--- a/src/main/java/org/bukkit/craftbukkit/scheduler/CraftScheduler.java
|
|
+++ b/src/main/java/org/bukkit/craftbukkit/scheduler/CraftScheduler.java
|
|
@@ -504,7 +504,7 @@ public class CraftScheduler implements BukkitScheduler {
|
|
this.parsePending();
|
|
} else {
|
|
//this.debugTail = this.debugTail.setNext(new CraftAsyncDebugger(currentTick + CraftScheduler.RECENT_TICKS, task.getOwner(), task.getTaskClass())); // Paper
|
|
- task.getOwner().getLogger().log(Level.SEVERE, "Unexpected Async Task in the Sync Scheduler. Report this to Purpur"); // Paper // Purpur
|
|
+ task.getOwner().getLogger().log(Level.SEVERE, "Unexpected Async Task in the Sync Scheduler. Report this to Plazma"); // Paper // Purpur // Plazma
|
|
// We don't need to parse pending
|
|
// (async tasks must live with race-conditions if they attempt to cancel between these few lines of code)
|
|
}
|
|
diff --git a/src/main/java/org/bukkit/craftbukkit/util/Versioning.java b/src/main/java/org/bukkit/craftbukkit/util/Versioning.java
|
|
index 99597258e8e88cd9e2c901c4ac3ff7faeeabee2b..0e695ea608c4e4770f5491d54ad47616d4e857c6 100644
|
|
--- a/src/main/java/org/bukkit/craftbukkit/util/Versioning.java
|
|
+++ b/src/main/java/org/bukkit/craftbukkit/util/Versioning.java
|
|
@@ -8,22 +8,25 @@ import java.util.logging.Logger;
|
|
import org.bukkit.Bukkit;
|
|
|
|
public final class Versioning {
|
|
- public static String getBukkitVersion() {
|
|
- String result = "Unknown-Version";
|
|
-
|
|
- InputStream stream = Bukkit.class.getClassLoader().getResourceAsStream("META-INF/maven/org.purpurmc.purpur/purpur-api/pom.properties"); // Pufferfish // Purpur
|
|
+ // Plazma start
|
|
+ public static String version = "Unknown-Version";
|
|
+ static {
|
|
+ InputStream stream = Bukkit.class.getClassLoader().getResourceAsStream("META-INF/maven/org.plazmamc.plazma/plazma-api/pom.properties");
|
|
Properties properties = new Properties();
|
|
|
|
if (stream != null) {
|
|
try {
|
|
properties.load(stream);
|
|
|
|
- result = properties.getProperty("version");
|
|
+ version = properties.getProperty("version");
|
|
} catch (IOException ex) {
|
|
- Logger.getLogger(Versioning.class.getName()).log(Level.SEVERE, "Could not get Bukkit version!", ex);
|
|
+ Logger.getLogger(Versioning.class.getName()).log(Level.SEVERE, "Could not get Plazma version!", ex);
|
|
}
|
|
}
|
|
+ }
|
|
|
|
- return result;
|
|
+ public static String getBukkitVersion() {
|
|
+ return version;
|
|
}
|
|
+ // Plazma end
|
|
}
|
|
diff --git a/src/main/java/org/purpurmc/purpur/PurpurConfig.java b/src/main/java/org/purpurmc/purpur/PurpurConfig.java
|
|
index be8b44daa0141151c973917a774aa07721647ed1..c93f6d275d0541e0751eefca45d17c4ccd39a62a 100644
|
|
--- a/src/main/java/org/purpurmc/purpur/PurpurConfig.java
|
|
+++ b/src/main/java/org/purpurmc/purpur/PurpurConfig.java
|
|
@@ -229,7 +229,7 @@ public class PurpurConfig {
|
|
deathMessageOnlyBroadcastToAffectedPlayer = getBoolean("settings.broadcasts.death.only-broadcast-to-affected-player", deathMessageOnlyBroadcastToAffectedPlayer);
|
|
}
|
|
|
|
- public static String serverModName = "Purpur";
|
|
+ public static String serverModName = "Plazma"; // Plazma
|
|
private static void serverModName() {
|
|
serverModName = getString("settings.server-mod-name", serverModName);
|
|
}
|
|
diff --git a/src/main/java/org/spigotmc/WatchdogThread.java b/src/main/java/org/spigotmc/WatchdogThread.java
|
|
index a810bfd3b8d6bd4d8f2ef8797e4281ae4fe8a67f..a7017a0f8326e307397d357774d39216e525bdd8 100644
|
|
--- a/src/main/java/org/spigotmc/WatchdogThread.java
|
|
+++ b/src/main/java/org/spigotmc/WatchdogThread.java
|
|
@@ -96,7 +96,7 @@ public final class WatchdogThread extends io.papermc.paper.util.TickThread // Pa
|
|
|
|
private WatchdogThread(long timeoutTime, boolean restart)
|
|
{
|
|
- super( "Watchdog Thread" ); // Purpur - use a generic name
|
|
+ super( "Plazma Watchdog Thread" ); // Purpur - use a generic name // Plazma
|
|
this.timeoutTime = timeoutTime;
|
|
this.restart = restart;
|
|
earlyWarningEvery = Math.min(io.papermc.paper.configuration.GlobalConfiguration.get().watchdog.earlyWarningEvery, timeoutTime); // Paper
|
|
@@ -155,14 +155,14 @@ public final class WatchdogThread extends io.papermc.paper.util.TickThread // Pa
|
|
if (isLongTimeout) {
|
|
// Paper end
|
|
log.log( Level.SEVERE, "------------------------------" );
|
|
- log.log( Level.SEVERE, "The server has stopped responding! This is (probably) not a Purpur bug." ); // Paper // Purpur
|
|
+ log.log( Level.SEVERE, "The server has stopped responding! This is (probably) not a Plazma bug." ); // Paper // Purpur // Plazma
|
|
log.log( Level.SEVERE, "If you see a plugin in the Server thread dump below, then please report it to that author" );
|
|
log.log( Level.SEVERE, "\t *Especially* if it looks like HTTP or MySQL operations are occurring" );
|
|
log.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" );
|
|
log.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" );
|
|
- log.log( Level.SEVERE, "If you are unsure or still think this is a Purpur bug, please report this to https://github.com/PurpurMC/Purpur/issues" ); // Purpur
|
|
+ log.log( Level.SEVERE, "If you are unsure or still think this is a Plazma bug, please report this to https://github.com/PlazmaMC/Plazma/issues" ); // Purpur // Plazma
|
|
log.log( Level.SEVERE, "Be sure to include ALL relevant console errors and Minecraft crash reports" );
|
|
- log.log( Level.SEVERE, "Purpur version: " + Bukkit.getServer().getVersion() ); // Purpur
|
|
+ log.log( Level.SEVERE, "Plazma version: " + Bukkit.getServer().getVersion() ); // Purpur
|
|
//
|
|
if ( net.minecraft.world.level.Level.lastPhysicsProblem != null )
|
|
{
|
|
@@ -185,12 +185,12 @@ public final class WatchdogThread extends io.papermc.paper.util.TickThread // Pa
|
|
// Paper end
|
|
} else
|
|
{
|
|
- log.log(Level.SEVERE, "--- DO NOT REPORT THIS TO PURPUR - THIS IS NOT A BUG OR A CRASH - " + Bukkit.getServer().getVersion() + " ---"); // Purpur
|
|
+ log.log(Level.SEVERE, "--- DO NOT REPORT THIS TO PLAZMA - THIS IS NOT A BUG OR A CRASH - " + Bukkit.getServer().getVersion() + " ---"); // Purpur // Plazma
|
|
log.log(Level.SEVERE, "The server has not responded for " + (currentTime - lastTick) / 1000 + " seconds! Creating thread dump");
|
|
}
|
|
// Paper end - Different message for short timeout
|
|
log.log( Level.SEVERE, "------------------------------" );
|
|
- log.log( Level.SEVERE, "Server thread dump (Look for plugins here before reporting to Purpur!):" ); // Paper // Purpur
|
|
+ log.log( Level.SEVERE, "Server thread dump (Look for plugins here before reporting to Plazma!):" ); // Paper // Purpur // Plazma
|
|
io.papermc.paper.chunk.system.scheduling.ChunkTaskScheduler.dumpAllChunkLoadInfo(isLongTimeout); // Paper // Paper - rewrite chunk system
|
|
this.dumpTickingInfo(); // Paper - log detailed tick information
|
|
WatchdogThread.dumpThread( ManagementFactory.getThreadMXBean().getThreadInfo( MinecraftServer.getServer().serverThread.getId(), Integer.MAX_VALUE ), log );
|
|
@@ -206,7 +206,7 @@ public final class WatchdogThread extends io.papermc.paper.util.TickThread // Pa
|
|
WatchdogThread.dumpThread( thread, log );
|
|
}
|
|
} else {
|
|
- log.log(Level.SEVERE, "--- DO NOT REPORT THIS TO PURPUR - THIS IS NOT A BUG OR A CRASH ---"); // Purpur
|
|
+ log.log(Level.SEVERE, "--- DO NOT REPORT THIS TO PLAZMA - THIS IS NOT A BUG OR A CRASH ---"); // Purpur // Plazma
|
|
}
|
|
|
|
log.log( Level.SEVERE, "------------------------------" );
|