Skip to content

Commit

Permalink
Add tick toggle command
Browse files Browse the repository at this point in the history
  • Loading branch information
AlphaKR93 committed Dec 14, 2024
1 parent 3f15d7a commit e54f3fc
Show file tree
Hide file tree
Showing 18 changed files with 170 additions and 59 deletions.
13 changes: 9 additions & 4 deletions patches/server/0007-Plazma-Configurations.patch
Original file line number Diff line number Diff line change
Expand Up @@ -1017,16 +1017,20 @@ index 0000000000000000000000000000000000000000..b6664ba0fce55f5cfa0c8d3051dc8c2b
+}
diff --git a/src/main/java/org/plazmamc/plazma/configurations/GlobalConfiguration.java b/src/main/java/org/plazmamc/plazma/configurations/GlobalConfiguration.java
new file mode 100644
index 0000000000000000000000000000000000000000..d8006ae086c18a4ef43906d516eba0d5fd397f5f
index 0000000000000000000000000000000000000000..b638690d5cd2360444e6c525f97f634d8e1dc60e
--- /dev/null
+++ b/src/main/java/org/plazmamc/plazma/configurations/GlobalConfiguration.java
@@ -0,0 +1,26 @@
@@ -0,0 +1,30 @@
+package org.plazmamc.plazma.configurations;
+
+import io.papermc.paper.configuration.Configuration;
+import io.papermc.paper.configuration.ConfigurationPart;
+import it.unimi.dsi.fastutil.objects.Reference2ObjectMap;
+import it.unimi.dsi.fastutil.objects.Reference2ObjectOpenHashMap;
+import net.minecraft.Util;
+import org.jetbrains.annotations.NotNull;
+import org.spongepowered.configurate.objectmapping.meta.Setting;
+import java.util.List;
+
+@SuppressWarnings({"CanBeFinal", "FieldCanBeLocal", "FieldMayBeFinal", "InnerClassMayBeStatic"})
+public class GlobalConfiguration extends ConfigurationPart {
Expand Down Expand Up @@ -1321,16 +1325,17 @@ index 0000000000000000000000000000000000000000..f2d3d51cb4b8fc7a5fd6db1a63289fff
+}
diff --git a/src/main/java/plazma/Config.java b/src/main/java/plazma/Config.java
new file mode 100644
index 0000000000000000000000000000000000000000..afa60976a6a0bbdd8ed5b9231df2aeeb669b231e
index 0000000000000000000000000000000000000000..dbba467f668600ef3dcc653d9bfe1f712c69e245
--- /dev/null
+++ b/src/main/java/plazma/Config.java
@@ -0,0 +1,20 @@
@@ -0,0 +1,21 @@
+package plazma;
+
+import org.jetbrains.annotations.Contract;
+import org.jspecify.annotations.NonNull;
+import org.plazmamc.plazma.configurations.GlobalConfiguration;
+import org.plazmamc.plazma.configurations.PlazmaConfigurations;
+import java.util.List;
+
+public interface Config {
+
Expand Down
18 changes: 12 additions & 6 deletions patches/server/0008-Setup-basic-configuration-sections.patch
Original file line number Diff line number Diff line change
Expand Up @@ -5,21 +5,27 @@ Subject: [PATCH] Setup basic configuration sections


diff --git a/src/main/java/org/plazmamc/plazma/configurations/GlobalConfiguration.java b/src/main/java/org/plazmamc/plazma/configurations/GlobalConfiguration.java
index d8006ae086c18a4ef43906d516eba0d5fd397f5f..aff5c68bc715c6ea9b5b808e5a94cbac9a3725ba 100644
index b638690d5cd2360444e6c525f97f634d8e1dc60e..35d5bd2f7dba1aa74547b6ae994bc84a56911bf2 100644
--- a/src/main/java/org/plazmamc/plazma/configurations/GlobalConfiguration.java
+++ b/src/main/java/org/plazmamc/plazma/configurations/GlobalConfiguration.java
@@ -3,6 +3,7 @@ package org.plazmamc.plazma.configurations;
import io.papermc.paper.configuration.Configuration;
import io.papermc.paper.configuration.ConfigurationPart;
@@ -6,6 +6,7 @@ import it.unimi.dsi.fastutil.objects.Reference2ObjectMap;
import it.unimi.dsi.fastutil.objects.Reference2ObjectOpenHashMap;
import net.minecraft.Util;
import org.jetbrains.annotations.NotNull;
+import org.spongepowered.configurate.objectmapping.meta.PostProcess;
import org.spongepowered.configurate.objectmapping.meta.Setting;
import java.util.List;

@SuppressWarnings({"CanBeFinal", "FieldCanBeLocal", "FieldMayBeFinal", "InnerClassMayBeStatic"})
@@ -23,4 +24,49 @@ public class GlobalConfiguration extends ConfigurationPart {
@@ -27,4 +28,55 @@ public class GlobalConfiguration extends ConfigurationPart {
@Setting(Configuration.VERSION_FIELD)
int version = VERSION;

+ public Command command;
+ public class Command extends ConfigurationPart {
+
+
+ }
+
+ public Player player;
+ public class Player extends ConfigurationPart {
+
Expand Down
4 changes: 2 additions & 2 deletions patches/server/0014-Tweak-console-logging.patch
Original file line number Diff line number Diff line change
Expand Up @@ -71,10 +71,10 @@ index 16999fa20c3621e016d1b0fadfb76f2fe03a2a69..8d7d050f12df83931bbb32f1832d7fcb
}

diff --git a/src/main/java/org/plazmamc/plazma/configurations/GlobalConfiguration.java b/src/main/java/org/plazmamc/plazma/configurations/GlobalConfiguration.java
index aff5c68bc715c6ea9b5b808e5a94cbac9a3725ba..779cdc523aab3afc529685f7e913bd6bb7336c51 100644
index 35d5bd2f7dba1aa74547b6ae994bc84a56911bf2..e153370e617e63a8e497036c93ea55dfe851bc6e 100644
--- a/src/main/java/org/plazmamc/plazma/configurations/GlobalConfiguration.java
+++ b/src/main/java/org/plazmamc/plazma/configurations/GlobalConfiguration.java
@@ -69,4 +69,14 @@ public class GlobalConfiguration extends ConfigurationPart {
@@ -79,4 +79,14 @@ public class GlobalConfiguration extends ConfigurationPart {

}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,10 +36,10 @@ index acdff7b4a00d563739fd301c3633a266875296fa..1266aaf4bfcf53aa16d7b9bd697a0c48

// CraftBukkit start - return boolean, add entity
diff --git a/src/main/java/org/plazmamc/plazma/configurations/GlobalConfiguration.java b/src/main/java/org/plazmamc/plazma/configurations/GlobalConfiguration.java
index 779cdc523aab3afc529685f7e913bd6bb7336c51..665b77d5cdf81a73d28f93294ee590af746bdfbc 100644
index e153370e617e63a8e497036c93ea55dfe851bc6e..11d386d3e134b1994302c4e026b6a11c46336522 100644
--- a/src/main/java/org/plazmamc/plazma/configurations/GlobalConfiguration.java
+++ b/src/main/java/org/plazmamc/plazma/configurations/GlobalConfiguration.java
@@ -60,6 +60,26 @@ public class GlobalConfiguration extends ConfigurationPart {
@@ -70,6 +70,26 @@ public class GlobalConfiguration extends ConfigurationPart {
public Structure structure;
public class Structure extends ConfigurationPart {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,10 @@ index 9ae16e24013ea5664d4ea6d52ed7dd188404890f..91f161d27a45174b6f3c31440eea46ff
return false;
} else if (this.player.isChangingDimension()) {
diff --git a/src/main/java/org/plazmamc/plazma/configurations/GlobalConfiguration.java b/src/main/java/org/plazmamc/plazma/configurations/GlobalConfiguration.java
index 665b77d5cdf81a73d28f93294ee590af746bdfbc..e2aa6b8ae63ed7f5a0882fcaf5a3fadc29f553f1 100644
index 11d386d3e134b1994302c4e026b6a11c46336522..93d746b0e7f263b36a66864834445cb41e5e2cee 100644
--- a/src/main/java/org/plazmamc/plazma/configurations/GlobalConfiguration.java
+++ b/src/main/java/org/plazmamc/plazma/configurations/GlobalConfiguration.java
@@ -27,6 +27,7 @@ public class GlobalConfiguration extends ConfigurationPart {
@@ -37,6 +37,7 @@ public class GlobalConfiguration extends ConfigurationPart {
public Player player;
public class Player extends ConfigurationPart {

Expand Down
4 changes: 2 additions & 2 deletions patches/server/0021-Configurable-cave-lava-sea-level.patch
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,10 @@ index 3f39d6c786d9dfdd9ad591e08ff05fcbb41a1df6..0346fd4ab7095d66c0eef5a440afbc7a

@Override
diff --git a/src/main/java/org/plazmamc/plazma/configurations/GlobalConfiguration.java b/src/main/java/org/plazmamc/plazma/configurations/GlobalConfiguration.java
index e2aa6b8ae63ed7f5a0882fcaf5a3fadc29f553f1..6648d50cea38c17714785a335e5bc25f98d2595e 100644
index 93d746b0e7f263b36a66864834445cb41e5e2cee..0b59a3a36c86948877cb8cb875dc114e9f9d284a 100644
--- a/src/main/java/org/plazmamc/plazma/configurations/GlobalConfiguration.java
+++ b/src/main/java/org/plazmamc/plazma/configurations/GlobalConfiguration.java
@@ -35,6 +35,24 @@ public class GlobalConfiguration extends ConfigurationPart {
@@ -45,6 +45,24 @@ public class GlobalConfiguration extends ConfigurationPart {
public WorldGeneration worldgen;
public class WorldGeneration extends ConfigurationPart {

Expand Down
4 changes: 2 additions & 2 deletions patches/server/0031-Implement-FreedomChat.patch
Original file line number Diff line number Diff line change
Expand Up @@ -52,10 +52,10 @@ index 8d7d050f12df83931bbb32f1832d7fcbc06317da..be4a5407fe9b692b72eb2b85e2dea160
player.loadGameTypes((CompoundTag) optional.orElse(null)); // CraftBukkit - decompile error
ServerGamePacketListenerImpl playerconnection = new ServerGamePacketListenerImpl(this.server, connection, player, clientData);
diff --git a/src/main/java/org/plazmamc/plazma/configurations/GlobalConfiguration.java b/src/main/java/org/plazmamc/plazma/configurations/GlobalConfiguration.java
index 6648d50cea38c17714785a335e5bc25f98d2595e..9e61505b8c34a3be20bcbe91ac98941729f5b64f 100644
index 0b59a3a36c86948877cb8cb875dc114e9f9d284a..6e14f6a03c7bcd820f3d787178a62844ad022332 100644
--- a/src/main/java/org/plazmamc/plazma/configurations/GlobalConfiguration.java
+++ b/src/main/java/org/plazmamc/plazma/configurations/GlobalConfiguration.java
@@ -29,6 +29,15 @@ public class GlobalConfiguration extends ConfigurationPart {
@@ -39,6 +39,15 @@ public class GlobalConfiguration extends ConfigurationPart {

public boolean checkSpectatorMovedToQuickly = !OPTIMIZE;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,10 @@ index 26da9e7c25ef6a89482838010d8ed6bcf8c87511..71aa3b9c5604f832e764e0d7a93da467
}

diff --git a/src/main/java/org/plazmamc/plazma/configurations/GlobalConfiguration.java b/src/main/java/org/plazmamc/plazma/configurations/GlobalConfiguration.java
index 9e61505b8c34a3be20bcbe91ac98941729f5b64f..d1d6ac9e3ad200228dc0ee08fd0152ccec38b397 100644
index 6e14f6a03c7bcd820f3d787178a62844ad022332..193e565b6d62caf278223db033351d03ff417637 100644
--- a/src/main/java/org/plazmamc/plazma/configurations/GlobalConfiguration.java
+++ b/src/main/java/org/plazmamc/plazma/configurations/GlobalConfiguration.java
@@ -114,6 +114,7 @@ public class GlobalConfiguration extends ConfigurationPart {
@@ -124,6 +124,7 @@ public class GlobalConfiguration extends ConfigurationPart {
public Miscellaneous misc;
public class Miscellaneous extends ConfigurationPart {

Expand Down
4 changes: 2 additions & 2 deletions patches/server/0036-Load-player-data-asynchronously.patch
Original file line number Diff line number Diff line change
Expand Up @@ -56,10 +56,10 @@ index be4a5407fe9b692b72eb2b85e2dea160a0555bca..579f81ed04eeb6373b25e6794d3bf0c4
// CraftBukkit start - Better rename detection
if (optional.isPresent()) {
diff --git a/src/main/java/org/plazmamc/plazma/configurations/GlobalConfiguration.java b/src/main/java/org/plazmamc/plazma/configurations/GlobalConfiguration.java
index d1d6ac9e3ad200228dc0ee08fd0152ccec38b397..9e5477d15668488139e431b8289d1fcfac38048c 100644
index 193e565b6d62caf278223db033351d03ff417637..7f30fa1928e1a7e59ee5acfdfd2334f810c30243 100644
--- a/src/main/java/org/plazmamc/plazma/configurations/GlobalConfiguration.java
+++ b/src/main/java/org/plazmamc/plazma/configurations/GlobalConfiguration.java
@@ -28,6 +28,7 @@ public class GlobalConfiguration extends ConfigurationPart {
@@ -38,6 +38,7 @@ public class GlobalConfiguration extends ConfigurationPart {
public class Player extends ConfigurationPart {

public boolean checkSpectatorMovedToQuickly = !OPTIMIZE;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,10 +51,10 @@ index ebbad97920df3d1645637e646a98e16cb04d361e..a149c949a042e1d1e504d9f5ce0bfa6d
int j = 0;
int k = 0;
diff --git a/src/main/java/org/plazmamc/plazma/configurations/GlobalConfiguration.java b/src/main/java/org/plazmamc/plazma/configurations/GlobalConfiguration.java
index 9e5477d15668488139e431b8289d1fcfac38048c..68a0e7144942022f0665e3124d98add70376d4a4 100644
index 7f30fa1928e1a7e59ee5acfdfd2334f810c30243..ba2c7b679f68d49add77731383bf68292fe9614a 100644
--- a/src/main/java/org/plazmamc/plazma/configurations/GlobalConfiguration.java
+++ b/src/main/java/org/plazmamc/plazma/configurations/GlobalConfiguration.java
@@ -129,4 +129,16 @@ public class GlobalConfiguration extends ConfigurationPart {
@@ -139,4 +139,16 @@ public class GlobalConfiguration extends ConfigurationPart {

}

Expand Down
4 changes: 2 additions & 2 deletions patches/server/0043-Process-pathfinding-asynchronously.patch
Original file line number Diff line number Diff line change
Expand Up @@ -1298,10 +1298,10 @@ index 1c83926923f50fb4da1a83dc91614c20a831555f..aec2d0f9a957be65d031957dbff874d8

Command.broadcastCommandMessage(sender, text("Successfully reloaded Plazma configuration files.", NamedTextColor.GREEN));
diff --git a/src/main/java/org/plazmamc/plazma/configurations/GlobalConfiguration.java b/src/main/java/org/plazmamc/plazma/configurations/GlobalConfiguration.java
index 68a0e7144942022f0665e3124d98add70376d4a4..e85e7b22e7b2e59897d4c35e2e5150c0a26235c6 100644
index ba2c7b679f68d49add77731383bf68292fe9614a..81f7ac9753058aa72dea5704fc9859ba3b909fb1 100644
--- a/src/main/java/org/plazmamc/plazma/configurations/GlobalConfiguration.java
+++ b/src/main/java/org/plazmamc/plazma/configurations/GlobalConfiguration.java
@@ -70,6 +70,26 @@ public class GlobalConfiguration extends ConfigurationPart {
@@ -80,6 +80,26 @@ public class GlobalConfiguration extends ConfigurationPart {
public class Entity extends ConfigurationPart {


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -218,10 +218,10 @@ index 0e6dfe2635ea5f5e410049b05f94f5083b2f18a4..584311a00c5037a6d5bc05b1261969aa
return null;
}
diff --git a/src/main/java/org/plazmamc/plazma/configurations/GlobalConfiguration.java b/src/main/java/org/plazmamc/plazma/configurations/GlobalConfiguration.java
index e85e7b22e7b2e59897d4c35e2e5150c0a26235c6..dc300e14e1bd03b4e855a360f1deda1cd7d6f7f0 100644
index 81f7ac9753058aa72dea5704fc9859ba3b909fb1..dc632fe50e777c019705796602debc3a7f33152d 100644
--- a/src/main/java/org/plazmamc/plazma/configurations/GlobalConfiguration.java
+++ b/src/main/java/org/plazmamc/plazma/configurations/GlobalConfiguration.java
@@ -45,6 +45,8 @@ public class GlobalConfiguration extends ConfigurationPart {
@@ -55,6 +55,8 @@ public class GlobalConfiguration extends ConfigurationPart {
public WorldGeneration worldgen;
public class WorldGeneration extends ConfigurationPart {

Expand All @@ -230,7 +230,7 @@ index e85e7b22e7b2e59897d4c35e2e5150c0a26235c6..dc300e14e1bd03b4e855a360f1deda1c
public LavaSea lavaSea;
public class LavaSea extends ConfigurationPart {

@@ -64,6 +66,11 @@ public class GlobalConfiguration extends ConfigurationPart {
@@ -74,6 +76,11 @@ public class GlobalConfiguration extends ConfigurationPart {

}

Expand Down
Loading

0 comments on commit e54f3fc

Please sign in to comment.