Skip to content

Commit

Permalink
Just clear
Browse files Browse the repository at this point in the history
  • Loading branch information
s-yh-china committed Sep 12, 2024
1 parent 9c18f6c commit 7467fae
Show file tree
Hide file tree
Showing 2 changed files with 74 additions and 185 deletions.
26 changes: 20 additions & 6 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..44a1b1dba4c3c969b7a5ee0552077edee526ad09
index 0000000000000000000000000000000000000000..10cf4d4aed544e0e0dd6698119734eb9e9cc92e2
--- /dev/null
+++ b/src/main/java/org/leavesmc/leaves/LeavesConfig.java
@@ -0,0 +1,886 @@
@@ -0,0 +1,889 @@
+package org.leavesmc.leaves;
+
+import com.destroystokyo.paper.util.SneakyThrow;
Expand Down Expand Up @@ -248,6 +248,9 @@ index 0000000000000000000000000000000000000000..44a1b1dba4c3c969b7a5ee0552077ede
+ @GlobalConfig(name = "manual-save-and-load", category = {"modify", "fakeplayer"})
+ public static boolean fakeplayerManualSaveAndLoad = false;
+
+ @GlobalConfig(name = "cache-skin", category = {"modify", "fakeplayer"}, lock = true)
+ public static boolean fakeplayerCacheSkin = false;
+
+ // Leaves end - modify - fakeplayer
+
+ // Leaves start - modify - minecraft-old
Expand Down Expand Up @@ -1038,10 +1041,10 @@ index 0000000000000000000000000000000000000000..0bccbf7816ef621316f0da4911ec112f
+}
diff --git a/src/main/java/org/leavesmc/leaves/command/CommandArgumentResult.java b/src/main/java/org/leavesmc/leaves/command/CommandArgumentResult.java
new file mode 100644
index 0000000000000000000000000000000000000000..3f0707940f22736f703c24f4da25c18fa6e5b309
index 0000000000000000000000000000000000000000..46aa6eaa75b65aad6bdbe4a5f517b42e87bcca77
--- /dev/null
+++ b/src/main/java/org/leavesmc/leaves/command/CommandArgumentResult.java
@@ -0,0 +1,65 @@
@@ -0,0 +1,69 @@
+package org.leavesmc.leaves.command;
+
+import net.minecraft.core.BlockPos;
Expand Down Expand Up @@ -1074,6 +1077,10 @@ index 0000000000000000000000000000000000000000..3f0707940f22736f703c24f4da25c18f
+ return Objects.requireNonNullElse(read(String.class), def);
+ }
+
+ public boolean readBoolean(boolean def) {
+ return Objects.requireNonNullElse(read(Boolean.class), def);
+ }
+
+ public BlockPos readPos() {
+ Integer[] pos = {read(Integer.class), read(Integer.class), read(Integer.class)};
+ for (Integer po : pos) {
Expand Down Expand Up @@ -1109,10 +1116,10 @@ index 0000000000000000000000000000000000000000..3f0707940f22736f703c24f4da25c18f
+}
diff --git a/src/main/java/org/leavesmc/leaves/command/CommandArgumentType.java b/src/main/java/org/leavesmc/leaves/command/CommandArgumentType.java
new file mode 100644
index 0000000000000000000000000000000000000000..0d6d33e66461dda39c8f0e8395bf3f047ef88cbd
index 0000000000000000000000000000000000000000..4ca3508475bbd9771768704e300fe12b717489d6
--- /dev/null
+++ b/src/main/java/org/leavesmc/leaves/command/CommandArgumentType.java
@@ -0,0 +1,48 @@
@@ -0,0 +1,55 @@
+package org.leavesmc.leaves.command;
+
+import org.jetbrains.annotations.NotNull;
Expand Down Expand Up @@ -1159,6 +1166,13 @@ index 0000000000000000000000000000000000000000..0d6d33e66461dda39c8f0e8395bf3f04
+ }
+ };
+
+ public static final CommandArgumentType<Boolean> BOOLEAN = new CommandArgumentType<>() {
+ @Override
+ public Boolean pasre(@NotNull String arg) {
+ return Boolean.parseBoolean(arg);
+ }
+ };
+
+ public abstract E pasre(@NotNull String arg);
+}
diff --git a/src/main/java/org/leavesmc/leaves/command/LeavesCommand.java b/src/main/java/org/leavesmc/leaves/command/LeavesCommand.java
Expand Down
Loading

0 comments on commit 7467fae

Please sign in to comment.