Skip to content

Commit

Permalink
Can use
Browse files Browse the repository at this point in the history
  • Loading branch information
s-yh-china committed Sep 11, 2024
1 parent fc9b6f0 commit 0814dd0
Show file tree
Hide file tree
Showing 4 changed files with 349 additions and 259 deletions.
13 changes: 8 additions & 5 deletions patches/server/0006-Leaves-Server-Config-And-Command.patch
Original file line number Diff line number Diff line change
Expand Up @@ -85,10 +85,10 @@ index d97771ecaf06b92d92b5ca0224ae0866e36703a6..439305bb4f5ce232aa6237276c121d53
.withRequiredArg()
diff --git a/src/main/java/org/leavesmc/leaves/LeavesConfig.java b/src/main/java/org/leavesmc/leaves/LeavesConfig.java
new file mode 100644
index 0000000000000000000000000000000000000000..59c98fa51afd4fd305852d14509b06f8bef859a1
index 0000000000000000000000000000000000000000..44a1b1dba4c3c969b7a5ee0552077edee526ad09
--- /dev/null
+++ b/src/main/java/org/leavesmc/leaves/LeavesConfig.java
@@ -0,0 +1,883 @@
@@ -0,0 +1,886 @@
+package org.leavesmc.leaves;
+
+import com.destroystokyo.paper.util.SneakyThrow;
Expand Down Expand Up @@ -228,13 +228,13 @@ index 0000000000000000000000000000000000000000..59c98fa51afd4fd305852d14509b06f8
+ public static boolean fakeplayerSpawnPhantom = false;
+
+ @GlobalConfig(name = "regen-amount", category = {"modify", "fakeplayer"}, verify = RegenAmountVerify.class)
+ public static double fakeplayerRegenAmount = 0.010;
+ public static double fakeplayerRegenAmount = 0.0;
+
+ private static class RegenAmountVerify extends ConfigVerifyImpl.DoubleConfigVerify {
+ @Override
+ public void check(Double old, Double value) throws IllegalArgumentException {
+ if (value <= 0.0) {
+ throw new IllegalArgumentException("regen-amount need > 0.0f");
+ if (value < 0.0) {
+ throw new IllegalArgumentException("regen-amount need >= 0.0");
+ }
+ }
+ }
Expand All @@ -245,6 +245,9 @@ index 0000000000000000000000000000000000000000..59c98fa51afd4fd305852d14509b06f8
+ @GlobalConfig(name = "modify-config", category = {"modify", "fakeplayer"})
+ public static boolean fakeplayerModifyConfig = false;
+
+ @GlobalConfig(name = "manual-save-and-load", category = {"modify", "fakeplayer"})
+ public static boolean fakeplayerManualSaveAndLoad = false;
+
+ // Leaves end - modify - fakeplayer
+
+ // Leaves start - modify - minecraft-old
Expand Down
Loading

0 comments on commit 0814dd0

Please sign in to comment.