mirror of
https://github.com/PurpurMC/Purpur.git
synced 2026-02-17 16:37:43 +01:00
port patches
i did this by hand because i can't figure out papers remapPatches for the life of me i need a better way for this
This commit is contained in:
@@ -1,48 +0,0 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Ben Kerllenevich <me@notom3ga.me>
|
||||
Date: Sun, 13 Jun 2021 06:52:56 -0400
|
||||
Subject: [PATCH] Build System Changes
|
||||
|
||||
todo: merge with rebrand patch
|
||||
|
||||
diff --git a/build.gradle.kts b/build.gradle.kts
|
||||
index f9d93a70ac754150b6e545c70b3071632be8f294..79b0248caa2bcce0d3574a06877bd7e2213b443c 100644
|
||||
--- a/build.gradle.kts
|
||||
+++ b/build.gradle.kts
|
||||
@@ -20,8 +20,8 @@ repositories {
|
||||
}
|
||||
|
||||
dependencies {
|
||||
- implementation(project(":Paper-API"))
|
||||
- implementation(project(":Paper-MojangAPI"))
|
||||
+ implementation(project(":Purpur-API")) // Purpur
|
||||
+ implementation("com.destroystokyo.paper:paper-mojangapi:1.16.5-R0.1-SNAPSHOT") // Purpur
|
||||
// Paper start
|
||||
implementation("org.jline:jline-terminal-jansi:3.12.1")
|
||||
implementation("net.minecrell:terminalconsoleappender:1.2.0")
|
||||
@@ -52,6 +52,7 @@ dependencies {
|
||||
|
||||
implementation("co.aikar:cleaner:1.0-SNAPSHOT") // Paper
|
||||
implementation("io.netty:netty-all:4.1.65.Final") // Paper
|
||||
+ implementation("cat.inspiracio:rhino-js-engine:1.7.7.1") // Purpur
|
||||
|
||||
testImplementation("io.github.classgraph:classgraph:4.8.47") // Paper - mob goal test
|
||||
testImplementation("junit:junit:4.13.1")
|
||||
@@ -66,7 +67,7 @@ tasks.jar {
|
||||
attributes(mapOf(
|
||||
"Main-Class" to "org.bukkit.craftbukkit.Main",
|
||||
"Implementation-Title" to "CraftBukkit",
|
||||
- "Implementation-Version" to "git-Paper-\"$gitHash\"",
|
||||
+ "Implementation-Version" to "git-Purpur-\"$gitHash\"", // Purpur
|
||||
"Implementation-Vendor" to SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss'Z'").format(Date()), // Paper
|
||||
"Specification-Title" to "Bukkit",
|
||||
"Specification-Version" to project.version,
|
||||
@@ -119,7 +120,7 @@ tasks.test {
|
||||
|
||||
fun TaskContainer.registerRunTask(name: String, block: JavaExec.() -> Unit): TaskProvider<JavaExec> =
|
||||
register<JavaExec>(name) {
|
||||
- group = "Paper"
|
||||
+ group = "paperweight" // Purpur
|
||||
workingDir = rootProject.layout.projectDirectory.dir(
|
||||
providers.gradleProperty("runWorkDir").forUseAtConfigurationTime().orElse("run")
|
||||
).get().asFile
|
||||
@@ -4,60 +4,52 @@ Date: Sat, 4 May 2019 01:02:11 -0500
|
||||
Subject: [PATCH] Rebrand
|
||||
|
||||
|
||||
diff --git a/pom.xml b/pom.xml
|
||||
index 1a9204c869dd36e80932b1366352db15ebd70723..8f4c8614df78c3b07818c293abf7cd5d2ce3da6a 100644
|
||||
--- a/pom.xml
|
||||
+++ b/pom.xml
|
||||
@@ -39,8 +39,10 @@
|
||||
diff --git a/build.gradle.kts b/build.gradle.kts
|
||||
index f9d93a70ac754150b6e545c70b3071632be8f294..79b0248caa2bcce0d3574a06877bd7e2213b443c 100644
|
||||
--- a/build.gradle.kts
|
||||
+++ b/build.gradle.kts
|
||||
@@ -20,8 +20,8 @@ repositories {
|
||||
}
|
||||
|
||||
<dependencies>
|
||||
<dependency>
|
||||
- <groupId>com.destroystokyo.paper</groupId>
|
||||
- <artifactId>paper-api</artifactId>
|
||||
+ <!-- Purpur start - our "upstream" is Paper (not Tuinity), so this is necessary for DependencyLoading.kt to work properly -->
|
||||
+ <groupId>net.pl3x.purpur</groupId>
|
||||
+ <artifactId>purpur-api</artifactId>
|
||||
+ <!-- Purpur end -->
|
||||
<version>${project.version}</version>
|
||||
<scope>compile</scope>
|
||||
</dependency>
|
||||
@@ -185,6 +187,14 @@
|
||||
</dependency>
|
||||
</dependencies>
|
||||
dependencies {
|
||||
- implementation(project(":Paper-API"))
|
||||
- implementation(project(":Paper-MojangAPI"))
|
||||
+ implementation(project(":Purpur-API")) // Purpur
|
||||
+ implementation("com.destroystokyo.paper:paper-mojangapi:1.16.5-R0.1-SNAPSHOT") // Purpur
|
||||
// Paper start
|
||||
implementation("org.jline:jline-terminal-jansi:3.12.1")
|
||||
implementation("net.minecrell:terminalconsoleappender:1.2.0")
|
||||
@@ -52,6 +52,7 @@ dependencies {
|
||||
|
||||
+ <repositories>
|
||||
+ <!-- Purpur - Snapshots -->
|
||||
+ <repository>
|
||||
+ <id>purpur-snapshots</id>
|
||||
+ <url>https://repo.pl3x.net/</url>
|
||||
+ </repository>
|
||||
+ </repositories>
|
||||
+
|
||||
<!-- This builds a completely 'ready to start' jar with all dependencies inside -->
|
||||
<build>
|
||||
<finalName>paper-${minecraft.version}</finalName>
|
||||
@@ -390,8 +400,15 @@
|
||||
<dependency>
|
||||
<groupId>org.eclipse.jdt</groupId>
|
||||
<artifactId>ecj</artifactId>
|
||||
- <version>3.24.0</version>
|
||||
+ <!-- Purpur start -->
|
||||
+ <version>3.25.0</version>
|
||||
+ </dependency>
|
||||
+ <dependency>
|
||||
+ <groupId>org.jetbrains.kotlin</groupId>
|
||||
+ <artifactId>kotlin-stdlib</artifactId>
|
||||
+ <version>1.4.33-SNAPSHOT</version>
|
||||
</dependency>
|
||||
+ <!-- Purpur end -->
|
||||
</dependencies>
|
||||
</plugin>
|
||||
<plugin>
|
||||
implementation("co.aikar:cleaner:1.0-SNAPSHOT") // Paper
|
||||
implementation("io.netty:netty-all:4.1.65.Final") // Paper
|
||||
+ implementation("cat.inspiracio:rhino-js-engine:1.7.7.1") // Purpur
|
||||
|
||||
testImplementation("io.github.classgraph:classgraph:4.8.47") // Paper - mob goal test
|
||||
testImplementation("junit:junit:4.13.1")
|
||||
@@ -66,7 +67,7 @@ tasks.jar {
|
||||
attributes(mapOf(
|
||||
"Main-Class" to "org.bukkit.craftbukkit.Main",
|
||||
"Implementation-Title" to "CraftBukkit",
|
||||
- "Implementation-Version" to "git-Paper-\"$gitHash\"",
|
||||
+ "Implementation-Version" to "git-Purpur-\"$gitHash\"", // Purpur
|
||||
"Implementation-Vendor" to SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss'Z'").format(Date()), // Paper
|
||||
"Specification-Title" to "Bukkit",
|
||||
"Specification-Version" to project.version,
|
||||
@@ -119,7 +120,7 @@ tasks.test {
|
||||
|
||||
fun TaskContainer.registerRunTask(name: String, block: JavaExec.() -> Unit): TaskProvider<JavaExec> =
|
||||
register<JavaExec>(name) {
|
||||
- group = "Paper"
|
||||
+ group = "paperweight" // Purpur
|
||||
workingDir = rootProject.layout.projectDirectory.dir(
|
||||
providers.gradleProperty("runWorkDir").forUseAtConfigurationTime().orElse("run")
|
||||
).get().asFile
|
||||
diff --git a/src/main/java/com/destroystokyo/paper/console/PaperConsole.java b/src/main/java/com/destroystokyo/paper/console/PaperConsole.java
|
||||
index ad87b575a0261200b280884e054a59e3ce59c41c..e56ebeaaa12494817d31099eed54ef2c50b98b9e 100644
|
||||
index e0b1f0671d16ddddcb6725acd25a1d1d69e42701..8c3c68465197fafc14849dc38a572e309931e2a2 100644
|
||||
--- a/src/main/java/com/destroystokyo/paper/console/PaperConsole.java
|
||||
+++ b/src/main/java/com/destroystokyo/paper/console/PaperConsole.java
|
||||
@@ -19,7 +19,7 @@ public final class PaperConsole extends SimpleTerminalConsole {
|
||||
@@ -17,7 +17,7 @@ public final class PaperConsole extends SimpleTerminalConsole {
|
||||
@Override
|
||||
protected LineReader buildReader(LineReaderBuilder builder) {
|
||||
builder
|
||||
@@ -66,37 +58,37 @@ index ad87b575a0261200b280884e054a59e3ce59c41c..e56ebeaaa12494817d31099eed54ef2c
|
||||
.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/server/EULA.java b/src/main/java/net/minecraft/server/EULA.java
|
||||
index a0f53c9eff04a40780b3ba568dbfc5bbe9bd8504..87891161f5b06bb8be0e2016b490484e6daca9d7 100644
|
||||
--- a/src/main/java/net/minecraft/server/EULA.java
|
||||
+++ b/src/main/java/net/minecraft/server/EULA.java
|
||||
@@ -72,7 +72,7 @@ public class EULA {
|
||||
diff --git a/src/main/java/net/minecraft/server/Eula.java b/src/main/java/net/minecraft/server/Eula.java
|
||||
index a1d5c0f8fe2adb2ee56f3217e089211ec7c61eb0..43a88bc58716eef4040584944f52893c5a47699f 100644
|
||||
--- a/src/main/java/net/minecraft/server/Eula.java
|
||||
+++ b/src/main/java/net/minecraft/server/Eula.java
|
||||
@@ -64,7 +64,7 @@ public class Eula {
|
||||
try {
|
||||
Properties properties = new Properties();
|
||||
|
||||
properties.setProperty("eula", "false");
|
||||
- properties.store(outputstream, "By changing the setting below to TRUE you are indicating your agreement to our EULA (https://account.mojang.com/documents/minecraft_eula).\nYou also agree that tacos are tasty, and the best food in the world."); // Paper - fix lag;
|
||||
+ properties.store(outputstream, "By changing the setting below to TRUE you are indicating your agreement to our EULA (https://account.mojang.com/documents/minecraft_eula).\nYou also agree that tacos are tasty, and the best food in the world."); // Paper - fix lag; // Tuinity - Tacos are disgusting // Purpur - no they're not
|
||||
} catch (Throwable throwable1) {
|
||||
throwable = throwable1;
|
||||
throw throwable1;
|
||||
- properties.store(outputStream, "By changing the setting below to TRUE you are indicating your agreement to our EULA (https://account.mojang.com/documents/minecraft_eula).\nYou also agree that tacos are tasty, and the best food in the world."); // Paper - fix lag;
|
||||
+ properties.store(outputStream, "By changing the setting below to TRUE you are indicating your agreement to our EULA (https://account.mojang.com/documents/minecraft_eula).\nYou also agree that tacos are tasty, and the best food in the world."); // Paper - fix lag; // Tuinity - Tacos are disgusting // Purpur - no they're not
|
||||
} catch (Throwable var5) {
|
||||
if (outputStream != null) {
|
||||
try {
|
||||
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
index bf80e870e6a2a6fe1d4ae1bea355bcd7a0735d3b..67988051844898e7ce3c60135c7bc9711be41102 100644
|
||||
index c6747f49ae8ddc9fc1bad82ab480f85d0883da5d..43abef32c56a5d1260fe2fb78b25260780d80935 100644
|
||||
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
@@ -1583,7 +1583,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
|
||||
}
|
||||
@@ -1649,7 +1649,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
|
||||
@DontObfuscate
|
||||
public String getServerModName() {
|
||||
- return "Paper"; //Paper - Paper > // Spigot - Spigot > // CraftBukkit - cb > vanilla!
|
||||
+ return "Purpur"; // Purpur // Tuinity // Paper // Spigot // CraftBukkit
|
||||
}
|
||||
|
||||
public CrashReport b(CrashReport crashreport) {
|
||||
public SystemReport fillSystemReport(SystemReport systemreport) {
|
||||
diff --git a/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java b/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
|
||||
index 1929b992be3aeaa37c7b04c458f0ee41a60c692e..5090a7b89d1a197a5d33c508542a1dd1c5843517 100644
|
||||
index eeefbb86cb88bd1b132bb6e22b4a4572cfb5e22c..674eccb7db4982adc28d6878ed8d5b28282b80b1 100644
|
||||
--- a/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
|
||||
@@ -274,11 +274,12 @@ public class DedicatedServer extends MinecraftServer implements IMinecraftServer
|
||||
@@ -279,11 +279,12 @@ public class DedicatedServer extends MinecraftServer implements ServerInterface
|
||||
DedicatedServer.LOGGER.warn("**** SERVER IS RUNNING IN OFFLINE/INSECURE MODE!");
|
||||
DedicatedServer.LOGGER.warn("The server will make no attempt to authenticate usernames. Beware.");
|
||||
// Spigot start
|
||||
@@ -237,7 +229,7 @@ index 0000000000000000000000000000000000000000..cabfcebf9f944f7a2a2a1cffc7401435
|
||||
+ }
|
||||
+}
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
index cebecee640ed5a7fc2b978e00ff7eb012228267d..81972c31961adde94c6878ec38373a864c4d6285 100644
|
||||
index 8a98bd1018afd934696fedbed24e271ab6b75f51..fccb85a34b799fd8ac85707e8fd43a08ae2b5fc4 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
@@ -230,7 +230,7 @@ import javax.annotation.Nullable; // Paper
|
||||
@@ -250,27 +242,27 @@ index cebecee640ed5a7fc2b978e00ff7eb012228267d..81972c31961adde94c6878ec38373a86
|
||||
private final String bukkitVersion = Versioning.getBukkitVersion();
|
||||
private final Logger logger = Logger.getLogger("Minecraft");
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
|
||||
index 6cb8608f8238c4a8c346b92ba672c8cc1c0cbcc4..3fa4d18d7a1e2d351fbe8e02d1e749587f98c2a2 100644
|
||||
index e5fc463e2d2e4a1b3c394ceb21e25f1c286aeb0a..58820a263109631decd9a65ef7ff9a57565a3175 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
|
||||
@@ -397,7 +397,7 @@ public final class CraftMagicNumbers implements UnsafeValues {
|
||||
@@ -395,7 +395,7 @@ public final class CraftMagicNumbers implements UnsafeValues {
|
||||
|
||||
@Override
|
||||
public com.destroystokyo.paper.util.VersionFetcher getVersionFetcher() {
|
||||
- return new com.destroystokyo.paper.PaperVersionFetcher();
|
||||
+ return new net.pl3x.purpur.PurpurVersionFetcher();
|
||||
+ return new net.pl3x.purpur.PurpurVersionFetcher(); // Purpur
|
||||
}
|
||||
|
||||
@Override
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/util/Versioning.java b/src/main/java/org/bukkit/craftbukkit/util/Versioning.java
|
||||
index 674096cab190d62622f9947853b056f57d43a2a5..13b98439320ac1401a920c01d7cf5a4b3a23deff 100644
|
||||
index 774556a62eb240da42e84db4502e2ed43495be17..13b98439320ac1401a920c01d7cf5a4b3a23deff 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/util/Versioning.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/util/Versioning.java
|
||||
@@ -11,7 +11,7 @@ public final class Versioning {
|
||||
public static String getBukkitVersion() {
|
||||
String result = "Unknown-Version";
|
||||
|
||||
- InputStream stream = Bukkit.class.getClassLoader().getResourceAsStream("META-INF/maven/com.destroystokyo.paper/paper-api/pom.properties");
|
||||
- InputStream stream = Bukkit.class.getClassLoader().getResourceAsStream("META-INF/maven/io.papermc.paper/paper-api/pom.properties");
|
||||
+ InputStream stream = Bukkit.class.getClassLoader().getResourceAsStream("META-INF/maven/net.pl3x.purpur/purpur-api/pom.properties"); // Tuinity // Purpur
|
||||
Properties properties = new Properties();
|
||||
|
||||
@@ -5,7 +5,7 @@ Subject: [PATCH] Purpur config files
|
||||
|
||||
|
||||
diff --git a/src/main/java/com/destroystokyo/paper/Metrics.java b/src/main/java/com/destroystokyo/paper/Metrics.java
|
||||
index dee00aac05f1acf050f05d4db557a08dd0f301c8..4d8740678049aa749b42618470e9cc838555528d 100644
|
||||
index 218f5bafeed8551b55b91c7fccaf6935c8b631ca..4d8740678049aa749b42618470e9cc838555528d 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 {
|
||||
@@ -21,7 +21,7 @@ index dee00aac05f1acf050f05d4db557a08dd0f301c8..4d8740678049aa749b42618470e9cc83
|
||||
}));
|
||||
|
||||
metrics.addCustomChart(new Metrics.SingleLineChart("players", () -> Bukkit.getOnlinePlayers().size()));
|
||||
- metrics.addCustomChart(new Metrics.SimplePie("online_mode", () -> Bukkit.getOnlineMode() || PaperConfig.isProxyOnlineMode() ? "online" : "offline"));
|
||||
- metrics.addCustomChart(new Metrics.SimplePie("online_mode", () -> Bukkit.getOnlineMode() ? "online" : "offline"));
|
||||
- metrics.addCustomChart(new Metrics.SimplePie("paper_version", () -> (Metrics.class.getPackage().getImplementationVersion() != null) ? Metrics.class.getPackage().getImplementationVersion() : "unknown"));
|
||||
+ metrics.addCustomChart(new Metrics.SimplePie("online_mode", () -> Bukkit.getOnlineMode() ? "online" : (PaperConfig.isProxyOnlineMode() ? "bungee" : "offline"))); // Purpur
|
||||
+ metrics.addCustomChart(new Metrics.SimplePie("purpur_version", () -> (Metrics.class.getPackage().getImplementationVersion() != null) ? Metrics.class.getPackage().getImplementationVersion() : "unknown")); // Purpur
|
||||
@@ -45,10 +45,10 @@ index 7acf077bc131af718c7548cc29deef558c04e463..10126cb1c3efa2e6c84f20c0da701a13
|
||||
config.save(CONFIG_FILE);
|
||||
} catch (IOException ex) {
|
||||
diff --git a/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java b/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
|
||||
index 5090a7b89d1a197a5d33c508542a1dd1c5843517..f9a9bf683bad6957fe1e7987b83c0278ba5379f8 100644
|
||||
index 674eccb7db4982adc28d6878ed8d5b28282b80b1..5fa2723c9899c69ac326f95acf49cd47406378f9 100644
|
||||
--- a/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
|
||||
@@ -212,6 +212,15 @@ public class DedicatedServer extends MinecraftServer implements IMinecraftServer
|
||||
@@ -218,6 +218,15 @@ public class DedicatedServer extends MinecraftServer implements ServerInterface
|
||||
return false;
|
||||
}
|
||||
com.destroystokyo.paper.PaperConfig.registerCommands();
|
||||
@@ -64,31 +64,27 @@ index 5090a7b89d1a197a5d33c508542a1dd1c5843517..f9a9bf683bad6957fe1e7987b83c0278
|
||||
com.destroystokyo.paper.VersionHistoryManager.INSTANCE.getClass(); // load version history now
|
||||
io.papermc.paper.brigadier.PaperBrigadierProviderImpl.INSTANCE.getClass(); // init PaperBrigadierProvider
|
||||
// Paper end
|
||||
diff --git a/src/main/java/net/minecraft/world/level/World.java b/src/main/java/net/minecraft/world/level/World.java
|
||||
index f7f593a9e58b537109fa6ca1c783f6614f4bfad5..bb01bbee04caafbe41435835e79bc699c3d96d46 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/World.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/World.java
|
||||
@@ -154,6 +154,12 @@ public abstract class World implements GeneratorAccess, AutoCloseable {
|
||||
public final com.destroystokyo.paper.PaperWorldConfig paperConfig; // Paper
|
||||
public final ChunkPacketBlockController chunkPacketBlockController; // Paper - Anti-Xray
|
||||
diff --git a/src/main/java/net/minecraft/world/level/Level.java b/src/main/java/net/minecraft/world/level/Level.java
|
||||
index 667aecc27e0c886f15a0418020d046e0a9791a0e..3b33c91cb0508b9b46dd6e5fab7594afefd7a834 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/Level.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/Level.java
|
||||
@@ -165,6 +165,8 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
|
||||
|
||||
public final com.destroystokyo.paper.PaperWorldConfig paperConfig; // Paper
|
||||
|
||||
+<<<<<<< HEAD
|
||||
+=======
|
||||
+ public final com.tuinity.tuinity.config.TuinityConfig.WorldConfig tuinityConfig; // Tuinity - Server Config
|
||||
+ public final net.pl3x.purpur.PurpurWorldConfig purpurConfig; // Purpur
|
||||
+
|
||||
+>>>>>>> f1ef523c0 (Purpur config files)
|
||||
public final co.aikar.timings.WorldTimingsHandler timings; // Paper
|
||||
public static BlockPosition lastPhysicsProblem; // Spigot
|
||||
public static BlockPos lastPhysicsProblem; // Spigot
|
||||
private org.spigotmc.TickLimiter entityLimiter;
|
||||
@@ -194,6 +200,7 @@ public abstract class World implements GeneratorAccess, AutoCloseable {
|
||||
this.spigotConfig = new org.spigotmc.SpigotWorldConfig(((net.minecraft.world.level.storage.WorldDataServer) worlddatamutable).getName()); // Spigot
|
||||
this.paperConfig = new com.destroystokyo.paper.PaperWorldConfig(((net.minecraft.world.level.storage.WorldDataServer) worlddatamutable).getName(), this.spigotConfig); // Paper
|
||||
this.chunkPacketBlockController = this.paperConfig.antiXray ? new ChunkPacketBlockControllerAntiXray(this, executor) : ChunkPacketBlockController.NO_OPERATION_INSTANCE; // Paper - Anti-Xray
|
||||
+ this.purpurConfig = new net.pl3x.purpur.PurpurWorldConfig((((net.minecraft.world.level.storage.WorldDataServer)worlddatamutable).getName())); // Purpur
|
||||
@@ -196,6 +198,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
|
||||
protected Level(WritableLevelData worlddatamutable, ResourceKey<Level> resourcekey, final DimensionType dimensionmanager, Supplier<ProfilerFiller> supplier, boolean flag, boolean flag1, long i, org.bukkit.generator.ChunkGenerator gen, org.bukkit.World.Environment env) {
|
||||
this.spigotConfig = new org.spigotmc.SpigotWorldConfig(((net.minecraft.world.level.storage.PrimaryLevelData) worlddatamutable).getLevelName()); // Spigot
|
||||
this.paperConfig = new com.destroystokyo.paper.PaperWorldConfig(((net.minecraft.world.level.storage.PrimaryLevelData) worlddatamutable).getLevelName(), this.spigotConfig); // Paper
|
||||
+ this.purpurConfig = new net.pl3x.purpur.PurpurWorldConfig((((net.minecraft.world.level.storage.PrimaryLevelData) worlddatamutable).getLevelName())); // Purpur
|
||||
this.generator = gen;
|
||||
this.world = new CraftWorld((WorldServer) this, gen, env);
|
||||
this.ticksPerAnimalSpawns = this.getServer().getTicksPerAnimalSpawns(); // CraftBukkit
|
||||
this.world = new CraftWorld((ServerLevel) this, gen, env);
|
||||
this.ticksPerAnimalSpawns = this.getCraftServer().getTicksPerAnimalSpawns(); // CraftBukkit
|
||||
diff --git a/src/main/java/net/pl3x/purpur/PurpurConfig.java b/src/main/java/net/pl3x/purpur/PurpurConfig.java
|
||||
new file mode 100644
|
||||
index 0000000000000000000000000000000000000000..74fc4fc2216cf82e1546ef3d567f2750b1240df1
|
||||
@@ -292,14 +288,14 @@ index 0000000000000000000000000000000000000000..361f7857e461578e90cb71e15027dada
|
||||
+}
|
||||
diff --git a/src/main/java/net/pl3x/purpur/command/PurpurCommand.java b/src/main/java/net/pl3x/purpur/command/PurpurCommand.java
|
||||
new file mode 100644
|
||||
index 0000000000000000000000000000000000000000..536955124afaec5c8a070249c7432cb99bf43d67
|
||||
index 0000000000000000000000000000000000000000..6e7f56fe2b78d7a09d5d130f2c88338fb8ae628e
|
||||
--- /dev/null
|
||||
+++ b/src/main/java/net/pl3x/purpur/command/PurpurCommand.java
|
||||
@@ -0,0 +1,65 @@
|
||||
+package net.pl3x.purpur.command;
|
||||
+
|
||||
+import net.minecraft.server.MinecraftServer;
|
||||
+import net.minecraft.server.level.WorldServer;
|
||||
+import net.minecraft.server.level.ServerLevel;
|
||||
+import net.pl3x.purpur.PurpurConfig;
|
||||
+import org.bukkit.ChatColor;
|
||||
+import org.bukkit.Location;
|
||||
@@ -345,8 +341,8 @@ index 0000000000000000000000000000000000000000..536955124afaec5c8a070249c7432cb9
|
||||
+
|
||||
+ MinecraftServer console = MinecraftServer.getServer();
|
||||
+ PurpurConfig.init((File) console.options.valueOf("purpur-settings"));
|
||||
+ for (WorldServer world : console.getWorlds()) {
|
||||
+ world.purpurConfig.init();
|
||||
+ for (ServerLevel level : console.getAllLevels()) {
|
||||
+ level.purpurConfig.init();
|
||||
+ }
|
||||
+ console.server.reloadCount++;
|
||||
+
|
||||
@@ -362,22 +358,18 @@ index 0000000000000000000000000000000000000000..536955124afaec5c8a070249c7432cb9
|
||||
+ }
|
||||
+}
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
index 81972c31961adde94c6878ec38373a864c4d6285..65ce132f0584abfb2d8496f1a7ea4a987a42ad94 100644
|
||||
index fccb85a34b799fd8ac85707e8fd43a08ae2b5fc4..2ae64cad8b482f943163494ac8264faabd3dd0bd 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
@@ -880,6 +880,11 @@ public final class CraftServer implements Server {
|
||||
@@ -879,6 +879,7 @@ public final class CraftServer implements Server {
|
||||
|
||||
org.spigotmc.SpigotConfig.init((File) console.options.valueOf("spigot-settings")); // Spigot
|
||||
com.destroystokyo.paper.PaperConfig.init((File) console.options.valueOf("paper-settings")); // Paper
|
||||
+<<<<<<< HEAD
|
||||
+=======
|
||||
+ com.tuinity.tuinity.config.TuinityConfig.init((File) console.options.valueOf("tuinity-settings")); // Tuinity - Server Config
|
||||
+ net.pl3x.purpur.PurpurConfig.init((File) console.options.valueOf("purpur-settings")); // Purpur
|
||||
+>>>>>>> f1ef523c0 (Purpur config files)
|
||||
for (WorldServer world : console.getWorlds()) {
|
||||
world.worldDataServer.setDifficulty(config.difficulty);
|
||||
world.setSpawnFlags(config.spawnMonsters, config.spawnAnimals);
|
||||
@@ -914,6 +919,7 @@ public final class CraftServer implements Server {
|
||||
for (ServerLevel world : this.console.getAllLevels()) {
|
||||
world.serverLevelData.setDifficulty(config.difficulty);
|
||||
world.setSpawnSettings(config.spawnMonsters, config.spawnAnimals);
|
||||
@@ -913,6 +914,7 @@ public final class CraftServer implements Server {
|
||||
}
|
||||
world.spigotConfig.init(); // Spigot
|
||||
world.paperConfig.init(); // Paper
|
||||
@@ -385,28 +377,18 @@ index 81972c31961adde94c6878ec38373a864c4d6285..65ce132f0584abfb2d8496f1a7ea4a98
|
||||
}
|
||||
|
||||
Plugin[] pluginClone = pluginManager.getPlugins().clone(); // Paper
|
||||
@@ -932,6 +938,7 @@ public final class CraftServer implements Server {
|
||||
reloadData();
|
||||
@@ -928,6 +930,7 @@ public final class CraftServer implements Server {
|
||||
this.reloadData();
|
||||
org.spigotmc.SpigotConfig.registerCommands(); // Spigot
|
||||
com.destroystokyo.paper.PaperConfig.registerCommands(); // Paper
|
||||
+ net.pl3x.purpur.PurpurConfig.registerCommands(); // Purpur
|
||||
overrideAllCommandBlockCommands = commandsConfiguration.getStringList("command-block-overrides").contains("*");
|
||||
ignoreVanillaPermissions = commandsConfiguration.getBoolean("ignore-vanilla-permissions");
|
||||
this.overrideAllCommandBlockCommands = this.commandsConfiguration.getStringList("command-block-overrides").contains("*");
|
||||
this.ignoreVanillaPermissions = this.commandsConfiguration.getBoolean("ignore-vanilla-permissions");
|
||||
|
||||
@@ -2371,6 +2378,29 @@ public final class CraftServer implements Server {
|
||||
@@ -2368,6 +2371,18 @@ public final class CraftServer implements Server {
|
||||
return com.destroystokyo.paper.PaperConfig.config;
|
||||
}
|
||||
|
||||
+<<<<<<< HEAD
|
||||
+=======
|
||||
+ // Tuinity start - add config to timings report
|
||||
+ @Override
|
||||
+ public YamlConfiguration getTuinityConfig()
|
||||
+ {
|
||||
+ return com.tuinity.tuinity.config.TuinityConfig.config;
|
||||
+ }
|
||||
+ // Tuinity end - add config to timings report
|
||||
+
|
||||
+ // Purpur start
|
||||
+ @Override
|
||||
+ public YamlConfiguration getPurpurConfig() {
|
||||
@@ -419,12 +401,11 @@ index 81972c31961adde94c6878ec38373a864c4d6285..65ce132f0584abfb2d8496f1a7ea4a98
|
||||
+ }
|
||||
+ // Purpur end
|
||||
+
|
||||
+>>>>>>> f1ef523c0 (Purpur config files)
|
||||
@Override
|
||||
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 ecd1f0784493dfc758483b7912ce086c3b0d7aa0..e34f27c6782b049d96de20e4acec1325bd97a26a 100644
|
||||
index ba01312f7615d0507c1bd1cd175588197f8d122e..b913ea98eb000edbab20d448da71a904570b48d6 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/Main.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/Main.java
|
||||
@@ -147,6 +147,14 @@ public class Main {
|
||||
@@ -433,10 +414,10 @@ index ecd1f0784493dfc758483b7912ce086c3b0d7aa0..e34f27c6782b049d96de20e4acec1325
|
||||
|
||||
+ // Purpur Start
|
||||
+ acceptsAll(asList("purpur", "purpur-settings"), "File for purpur settings")
|
||||
+ .withRequiredArg()
|
||||
+ .ofType(File.class)
|
||||
+ .defaultsTo(new File("purpur.yml"))
|
||||
+ .describedAs("Yml file");
|
||||
+ .withRequiredArg()
|
||||
+ .ofType(File.class)
|
||||
+ .defaultsTo(new File("purpur.yml"))
|
||||
+ .describedAs("Yml file");
|
||||
+ // Purpur end
|
||||
+
|
||||
// Paper start
|
||||
Reference in New Issue
Block a user