mirror of
https://github.com/PurpurMC/Purpur.git
synced 2026-02-17 16:37:43 +01:00
Upstream has released updates that appear to apply and compile correctly Paper Changes: PaperMC/Paper@7b3b593 [ci skip] Update checkout action in workflow (#8510) PaperMC/Paper@36869cc Fix new block data in EntityChangeBlockEvent for silverfish when mobGriefing isn't enabled (#8099) PaperMC/Paper@2432233 Add allow server listing & text filtering client options (#7595) PaperMC/Paper@954e6f0 Fix a bunch more forceDrops for dropping items (#8095) PaperMC/Paper@32d95e9 Track projectile source for fireworks from dispensers (#8044) PaperMC/Paper@0249750 Fix EntityArgument suggestion permissions to align with EntitySelector#checkPermissions (#8511) PaperMC/Paper@8acb05d Make CommandSyntaxException implement ComponentMessageThrowable (#8513) PaperMC/Paper@c264018 [ci skip] Undo modification to removed patches in latest commit (#8512) PaperMC/Paper@304ab35 [ci skip] Remove old todo file PaperMC/Paper@8a4b752 Fix wrong descriptor in ASMEventExecutorGenerator (#8506) PaperMC/Paper@b743144 Fix MC-147659 (#8423) PaperMC/Paper@aaf5e39 Deprecate unused VehicleEntityCollisionEvent methods (#8498)
57 lines
3.0 KiB
Diff
57 lines
3.0 KiB
Diff
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
From: BillyGalbreath <blake.galbreath@gmail.com>
|
|
Date: Sun, 12 Jun 2022 09:18:57 -0500
|
|
Subject: [PATCH] Make pufferfish config relocatable
|
|
|
|
|
|
diff --git a/src/main/java/gg/pufferfish/pufferfish/PufferfishConfig.java b/src/main/java/gg/pufferfish/pufferfish/PufferfishConfig.java
|
|
index 44ee788422cdf946be5f156e2a4662b0b030cdc9..c9ae76401278057f87ebef13619a114722e81a1d 100644
|
|
--- a/src/main/java/gg/pufferfish/pufferfish/PufferfishConfig.java
|
|
+++ b/src/main/java/gg/pufferfish/pufferfish/PufferfishConfig.java
|
|
@@ -28,6 +28,7 @@ public class PufferfishConfig {
|
|
|
|
private static final YamlFile config = new YamlFile();
|
|
private static int updates = 0;
|
|
+ public static File pufferfishFile; // Purpur
|
|
|
|
private static ConfigurationSection convertToBukkit(org.simpleyaml.configuration.ConfigurationSection section) {
|
|
ConfigurationSection newSection = new MemoryConfiguration();
|
|
@@ -50,7 +51,7 @@ public class PufferfishConfig {
|
|
}
|
|
|
|
public static void load() throws IOException {
|
|
- File configFile = new File("pufferfish.yml");
|
|
+ File configFile = pufferfishFile; // Purpur
|
|
|
|
if (configFile.exists()) {
|
|
try {
|
|
diff --git a/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java b/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
|
|
index 8b8655300fa81de8352dfec92c088f4f45511f21..d6c563dff2e816e043e096f8286e3d975cc86290 100644
|
|
--- a/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
|
|
+++ b/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
|
|
@@ -235,6 +235,7 @@ public class DedicatedServer extends MinecraftServer implements ServerInterface
|
|
com.destroystokyo.paper.VersionHistoryManager.INSTANCE.getClass(); // load version history now
|
|
io.papermc.paper.brigadier.PaperBrigadierProviderImpl.INSTANCE.getClass(); // init PaperBrigadierProvider
|
|
// Paper end
|
|
+ gg.pufferfish.pufferfish.PufferfishConfig.pufferfishFile = (java.io.File) options.valueOf("pufferfish-settings"); // Purpur
|
|
gg.pufferfish.pufferfish.PufferfishConfig.load(); // Pufferfish
|
|
gg.pufferfish.pufferfish.PufferfishCommand.init(); // Pufferfish
|
|
|
|
diff --git a/src/main/java/org/bukkit/craftbukkit/Main.java b/src/main/java/org/bukkit/craftbukkit/Main.java
|
|
index f42d75f326bc26e4ab15f12a1a3e0cfc68ce91db..8a4c8701122edf2f29edbe97e4fa199da2744e9e 100644
|
|
--- a/src/main/java/org/bukkit/craftbukkit/Main.java
|
|
+++ b/src/main/java/org/bukkit/craftbukkit/Main.java
|
|
@@ -172,6 +172,12 @@ public class Main {
|
|
.ofType(File.class)
|
|
.defaultsTo(new File("purpur.yml"))
|
|
.describedAs("Yml file");
|
|
+
|
|
+ acceptsAll(asList("pufferfish", "pufferfish-settings"), "File for pufferfish settings")
|
|
+ .withRequiredArg()
|
|
+ .ofType(File.class)
|
|
+ .defaultsTo(new File("pufferfish.yml"))
|
|
+ .describedAs("Yml file");
|
|
// Purpur end
|
|
|
|
// Paper start
|