mirror of
https://github.com/PurpurMC/Purpur.git
synced 2026-02-18 17:07:43 +01:00
Upstream has released updates that appear to apply and compile correctly Paper Changes: 9a129fa99 Add #getEligibleHumans to SkeletonHorseTrapEvent b5e23c7a6 Fix merging spawning values a932e8ad7 Turn off spigot verbose world by default 8ced89f65 Fix Delegation to vanilla chunk gen
67 lines
3.1 KiB
Diff
67 lines
3.1 KiB
Diff
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
From: jmp <jasonpenilla2@me.com>
|
|
Date: Mon, 30 Nov 2020 18:30:13 -0800
|
|
Subject: [PATCH] Config migration: disable saving projectiles to disk ->
|
|
projectile load/save limit of 0
|
|
|
|
|
|
diff --git a/src/main/java/net/pl3x/purpur/PurpurConfig.java b/src/main/java/net/pl3x/purpur/PurpurConfig.java
|
|
index 06e40ffed1..3c4c099beb 100644
|
|
--- a/src/main/java/net/pl3x/purpur/PurpurConfig.java
|
|
+++ b/src/main/java/net/pl3x/purpur/PurpurConfig.java
|
|
@@ -1,6 +1,7 @@
|
|
package net.pl3x.purpur;
|
|
|
|
import co.aikar.timings.TimingsManager;
|
|
+import com.destroystokyo.paper.PaperConfig;
|
|
import com.google.common.base.Throwables;
|
|
import net.minecraft.server.MinecraftServer;
|
|
import net.pl3x.purpur.command.PurpurCommand;
|
|
@@ -130,6 +131,17 @@ public class PurpurConfig {
|
|
return config.getString(path, config.getString(path));
|
|
}
|
|
|
|
+ private static void migrateDisableProjectileSaving() {
|
|
+ if (PurpurConfig.version < 6) {
|
|
+ final boolean saveProjectilesToDisk = getBoolean("world-settings.default.gameplay-mechanics.save-projectiles-to-disk", true);
|
|
+ set("world-settings.default.gameplay-mechanics.save-projectiles-to-disk", null);
|
|
+ if (!saveProjectilesToDisk) {
|
|
+ PaperConfig.config.set("world-settings.default.projectile-load-save-per-chunk-limit", 0);
|
|
+ PaperConfig.saveConfig();
|
|
+ }
|
|
+ }
|
|
+ }
|
|
+
|
|
public static String afkBroadcastAway = "§e§o%s is now AFK";
|
|
public static String afkBroadcastBack = "§e§o%s is no longer AFK";
|
|
public static String afkTabListPrefix = "[AFK] ";
|
|
diff --git a/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java b/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java
|
|
index d42fe79ece..b5cda85f86 100644
|
|
--- a/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java
|
|
+++ b/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java
|
|
@@ -1,5 +1,6 @@
|
|
package net.pl3x.purpur;
|
|
|
|
+import com.destroystokyo.paper.PaperConfig;
|
|
import net.minecraft.server.Block;
|
|
import net.minecraft.server.Blocks;
|
|
import net.minecraft.server.EnumDifficulty;
|
|
@@ -84,6 +85,17 @@ public class PurpurWorldConfig {
|
|
return PurpurConfig.config.getString("world-settings." + worldName + "." + path, PurpurConfig.config.getString("world-settings.default." + path));
|
|
}
|
|
|
|
+ private void migrateDisableProjectileSaving() {
|
|
+ if (PurpurConfig.version < 6) {
|
|
+ final boolean saveProjectilesToDisk = PurpurConfig.config.getBoolean("world-settings." + worldName + ".gameplay-mechanics.save-projectiles-to-disk", true);
|
|
+ PurpurConfig.config.set("world-settings." + worldName + ".gameplay-mechanics.save-projectiles-to-disk", null);
|
|
+ if (!saveProjectilesToDisk) {
|
|
+ PaperConfig.config.set("world-settings." + worldName + ".projectile-load-save-per-chunk-limit", 0);
|
|
+ PaperConfig.saveConfig();
|
|
+ }
|
|
+ }
|
|
+ }
|
|
+
|
|
public boolean armorstandSetNameVisible = false;
|
|
public boolean armorstandFixNametags = false;
|
|
public float armorstandStepHeight = 0.0F;
|