This commit is contained in:
Simon Gardling 2021-06-10 16:13:42 -04:00
parent f54a237a0d
commit 38e7312ecd
10 changed files with 39 additions and 41 deletions

View File

@ -80,17 +80,17 @@ index d8fb0edceba805b9359d02304751182cd0c5a79f..cfd2846c70db349aaf5377217ede4225
if (this.isFireProof() || this.world.isClientSide) { if (this.isFireProof() || this.world.isClientSide) {
this.extinguish(); this.extinguish();
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
index 5022827a4fb08279fd0be346804fc36babea0cb8..dd877145feec763a64fb7539f21b18b8c0f9a833 100644 index 5022827a4fb08279fd0be346804fc36babea0cb8..82d82e73cfab8689d9c87019d2992a3b770f150d 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
@@ -876,6 +876,7 @@ public final class CraftServer implements Server { @@ -882,6 +882,7 @@ public final class CraftServer implements Server {
playerList.getProfileBans().load(); com.destroystokyo.paper.PaperConfig.init((File) console.options.valueOf("paper-settings")); // Paper
} catch (IOException ex) { com.tuinity.tuinity.config.TuinityConfig.init((File) console.options.valueOf("tuinity-settings")); // Tuinity - Server Config
logger.log(Level.WARNING, "Failed to load banned-players.json, " + ex.getMessage()); de.minebench.origami.OrigamiConfig.init((File) console.options.valueOf("origami-settings")); // Origami - Server Config
+ org.yatopiamc.yatopia.server.YatopiaConfig.init((File) console.options.valueOf("yatopia-settings")); // Yatopia + org.yatopiamc.yatopia.server.YatopiaConfig.init((File) console.options.valueOf("yatopia-settings")); // Yatopia
} for (WorldServer world : console.getWorlds()) {
world.worldDataServer.setDifficulty(config.difficulty);
org.spigotmc.SpigotConfig.init((File) console.options.valueOf("spigot-settings")); // Spigot world.setSpawnFlags(config.spawnMonsters, config.spawnAnimals);
@@ -2396,6 +2397,13 @@ public final class CraftServer implements Server { @@ -2396,6 +2397,13 @@ public final class CraftServer implements Server {
org.spigotmc.RestartCommand.restart(); org.spigotmc.RestartCommand.restart();
} }

View File

@ -17,17 +17,17 @@ index 70d07a7e1881d02f6d92ea65bcf9bd5a157fb2cf..75a690b149e7275eba0278033b98bdc2
de.minebench.origami.OrigamiConfig.init((java.io.File) options.valueOf("origami-settings")); de.minebench.origami.OrigamiConfig.init((java.io.File) options.valueOf("origami-settings"));
this.setPVP(dedicatedserverproperties.pvp); this.setPVP(dedicatedserverproperties.pvp);
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
index dd877145feec763a64fb7539f21b18b8c0f9a833..ea4bd11604d0b7dc9e6641a5f7db70bbde286b71 100644 index 82d82e73cfab8689d9c87019d2992a3b770f150d..45953895cbf2c5059de8bd39e25e5a8d13bfdb60 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
@@ -336,6 +336,7 @@ public final class CraftServer implements Server { @@ -937,6 +937,7 @@ public final class CraftServer implements Server {
} reloadData();
org.spigotmc.SpigotConfig.registerCommands(); // Spigot
saveCommandsConfig(); com.destroystokyo.paper.PaperConfig.registerCommands(); // Paper
+ org.yatopiamc.yatopia.server.YatopiaConfig.registerCommands(); // Yatopia + org.yatopiamc.yatopia.server.YatopiaConfig.registerCommands(); // Yatopia
overrideAllCommandBlockCommands = commandsConfiguration.getStringList("command-block-overrides").contains("*"); overrideAllCommandBlockCommands = commandsConfiguration.getStringList("command-block-overrides").contains("*");
ignoreVanillaPermissions = commandsConfiguration.getBoolean("ignore-vanilla-permissions"); ignoreVanillaPermissions = commandsConfiguration.getBoolean("ignore-vanilla-permissions");
pluginManager.useTimings(configuration.getBoolean("settings.plugin-profiling"));
diff --git a/src/main/java/org/yatopiamc/yatopia/server/NSPTCommand.java b/src/main/java/org/yatopiamc/yatopia/server/NSPTCommand.java diff --git a/src/main/java/org/yatopiamc/yatopia/server/NSPTCommand.java b/src/main/java/org/yatopiamc/yatopia/server/NSPTCommand.java
new file mode 100644 new file mode 100644
index 0000000000000000000000000000000000000000..e6eaa07c57e04bbfba9e4aa8e0e939f85169d0c8 index 0000000000000000000000000000000000000000..e6eaa07c57e04bbfba9e4aa8e0e939f85169d0c8
@ -94,7 +94,7 @@ index 0000000000000000000000000000000000000000..e6eaa07c57e04bbfba9e4aa8e0e939f8
+ } + }
+} +}
diff --git a/src/main/java/org/yatopiamc/yatopia/server/YatopiaConfig.java b/src/main/java/org/yatopiamc/yatopia/server/YatopiaConfig.java diff --git a/src/main/java/org/yatopiamc/yatopia/server/YatopiaConfig.java b/src/main/java/org/yatopiamc/yatopia/server/YatopiaConfig.java
index 50f232c956f68d3d9c3eaf645810e38d805f4531..98b78bd015218a39b7512c67e0db9ba0451e3d6d 100644 index 50f232c956f68d3d9c3eaf645810e38d805f4531..bd6e45e256736bdf7b40b2a3fa3f371f601e3970 100644
--- a/src/main/java/org/yatopiamc/yatopia/server/YatopiaConfig.java --- a/src/main/java/org/yatopiamc/yatopia/server/YatopiaConfig.java
+++ b/src/main/java/org/yatopiamc/yatopia/server/YatopiaConfig.java +++ b/src/main/java/org/yatopiamc/yatopia/server/YatopiaConfig.java
@@ -6,11 +6,14 @@ import java.io.IOException; @@ -6,11 +6,14 @@ import java.io.IOException;
@ -112,24 +112,22 @@ index 50f232c956f68d3d9c3eaf645810e38d805f4531..98b78bd015218a39b7512c67e0db9ba0
import org.bukkit.configuration.InvalidConfigurationException; import org.bukkit.configuration.InvalidConfigurationException;
import org.bukkit.configuration.file.YamlConfiguration; import org.bukkit.configuration.file.YamlConfiguration;
@@ -24,6 +27,7 @@ public class YatopiaConfig { @@ -24,8 +27,14 @@ public class YatopiaConfig {
public static YamlConfiguration config; public static YamlConfiguration config;
public static int version; // since we're remapping sidestreams' configs we need this public public static int version; // since we're remapping sidestreams' configs we need this public
public static boolean verbose; // since we're remapping sidestreams' configs we need this public public static boolean verbose; // since we're remapping sidestreams' configs we need this public
+ private static Map<String, Command> commands; + private static Map<String, Command> commands;
/*========================================================================*/ /*========================================================================*/
public static void init(File configFile) { + static {
@@ -39,6 +43,8 @@ public class YatopiaConfig {
config.options().header(HEADER);
config.options().copyDefaults(true);
verbose = getBoolean("verbose", false);
+ commands = new HashMap<>(); + commands = new HashMap<>();
+ commands.put("nspt", new NSPTCommand("nspt")); + commands.put("nspt", new NSPTCommand("nspt"));
+ }
version = getInt("config-version", 1); +
set("config-version", 1); public static void init(File configFile) {
@@ -46,6 +52,12 @@ public class YatopiaConfig { CONFIG_FILE = configFile;
config = new YamlConfiguration();
@@ -46,6 +55,12 @@ public class YatopiaConfig {
readConfig(YatopiaConfig.class, null); readConfig(YatopiaConfig.class, null);
} }

View File

@ -27,10 +27,10 @@ index 8513795943497ca80232e7d47066a6944c2f45ec..660f7006690d2eb7e16239faffabfd88
this.disconnect(com.destroystokyo.paper.PaperConfig.flyingKickVehicleMessage, org.bukkit.event.player.PlayerKickEvent.Cause.FLYING_VEHICLE); // Paper - use configurable kick message & kick event cause this.disconnect(com.destroystokyo.paper.PaperConfig.flyingKickVehicleMessage, org.bukkit.event.player.PlayerKickEvent.Cause.FLYING_VEHICLE); // Paper - use configurable kick message & kick event cause
return; return;
diff --git a/src/main/java/org/yatopiamc/yatopia/server/YatopiaConfig.java b/src/main/java/org/yatopiamc/yatopia/server/YatopiaConfig.java diff --git a/src/main/java/org/yatopiamc/yatopia/server/YatopiaConfig.java b/src/main/java/org/yatopiamc/yatopia/server/YatopiaConfig.java
index 98b78bd015218a39b7512c67e0db9ba0451e3d6d..90760a81f2d66082d4603df430f931403e5989b4 100644 index bd6e45e256736bdf7b40b2a3fa3f371f601e3970..016d04054550360db0e49fc836209761a5912922 100644
--- a/src/main/java/org/yatopiamc/yatopia/server/YatopiaConfig.java --- a/src/main/java/org/yatopiamc/yatopia/server/YatopiaConfig.java
+++ b/src/main/java/org/yatopiamc/yatopia/server/YatopiaConfig.java +++ b/src/main/java/org/yatopiamc/yatopia/server/YatopiaConfig.java
@@ -218,4 +218,11 @@ public class YatopiaConfig { @@ -221,4 +221,11 @@ public class YatopiaConfig {
private static void fixFallDistance() { private static void fixFallDistance() {
fixFallDistance = getBoolean("settings.fixFallDistance", false); fixFallDistance = getBoolean("settings.fixFallDistance", false);
} }

View File

@ -40,10 +40,10 @@ index 587eb3a9fd8a155fcb8acc6c5850cfa4de77d626..8e6fd7ed9d79e61b8b82b853bf001705
int i = 29999999; int i = 29999999;
diff --git a/src/main/java/org/yatopiamc/yatopia/server/YatopiaConfig.java b/src/main/java/org/yatopiamc/yatopia/server/YatopiaConfig.java diff --git a/src/main/java/org/yatopiamc/yatopia/server/YatopiaConfig.java b/src/main/java/org/yatopiamc/yatopia/server/YatopiaConfig.java
index 90760a81f2d66082d4603df430f931403e5989b4..db1f0c57adbe2aacba9422820cf1a8757ea9ad4f 100644 index 016d04054550360db0e49fc836209761a5912922..b815fbcbf83d0d573da41d8573b7da6f212c61fc 100644
--- a/src/main/java/org/yatopiamc/yatopia/server/YatopiaConfig.java --- a/src/main/java/org/yatopiamc/yatopia/server/YatopiaConfig.java
+++ b/src/main/java/org/yatopiamc/yatopia/server/YatopiaConfig.java +++ b/src/main/java/org/yatopiamc/yatopia/server/YatopiaConfig.java
@@ -225,4 +225,9 @@ public class YatopiaConfig { @@ -228,4 +228,9 @@ public class YatopiaConfig {
checkFlying = getBoolean("settings.checks.flight", checkFlying); checkFlying = getBoolean("settings.checks.flight", checkFlying);
checkVehicleFlying = getBoolean("settings.checks.vehicle-flight", checkVehicleFlying); checkVehicleFlying = getBoolean("settings.checks.vehicle-flight", checkVehicleFlying);
} }

View File

@ -27,10 +27,10 @@ index c813077455a463dd558076d1d7474829f76b905a..742d802d63963778454e41e5b19a3d88
} }
diff --git a/src/main/java/org/yatopiamc/yatopia/server/YatopiaConfig.java b/src/main/java/org/yatopiamc/yatopia/server/YatopiaConfig.java diff --git a/src/main/java/org/yatopiamc/yatopia/server/YatopiaConfig.java b/src/main/java/org/yatopiamc/yatopia/server/YatopiaConfig.java
index db1f0c57adbe2aacba9422820cf1a8757ea9ad4f..8e87389f2323576e292bcca1730c2c49bf0eadba 100644 index b815fbcbf83d0d573da41d8573b7da6f212c61fc..5b22f33462dea5491f752d4f50f55d037b381bd3 100644
--- a/src/main/java/org/yatopiamc/yatopia/server/YatopiaConfig.java --- a/src/main/java/org/yatopiamc/yatopia/server/YatopiaConfig.java
+++ b/src/main/java/org/yatopiamc/yatopia/server/YatopiaConfig.java +++ b/src/main/java/org/yatopiamc/yatopia/server/YatopiaConfig.java
@@ -230,4 +230,14 @@ public class YatopiaConfig { @@ -233,4 +233,14 @@ public class YatopiaConfig {
private static void intervals() { private static void intervals() {
playerTimeStatisticsInterval = Math.max(1, getInt("settings.intervals.player-time-statistics", 1)); playerTimeStatisticsInterval = Math.max(1, getInt("settings.intervals.player-time-statistics", 1));
} }

View File

@ -21,10 +21,10 @@ index e026ec3920936223864538974151ae53a393e86f..88bb4e47b5def2ba1543cd73411fbcff
TileEntityHopper.skipHopperEvents = worldserver.paperConfig.disableHopperMoveEvents || org.bukkit.event.inventory.InventoryMoveItemEvent.getHandlerList().getRegisteredListeners().length == 0; // Paper TileEntityHopper.skipHopperEvents = worldserver.paperConfig.disableHopperMoveEvents || org.bukkit.event.inventory.InventoryMoveItemEvent.getHandlerList().getRegisteredListeners().length == 0; // Paper
diff --git a/src/main/java/org/yatopiamc/yatopia/server/YatopiaConfig.java b/src/main/java/org/yatopiamc/yatopia/server/YatopiaConfig.java diff --git a/src/main/java/org/yatopiamc/yatopia/server/YatopiaConfig.java b/src/main/java/org/yatopiamc/yatopia/server/YatopiaConfig.java
index 8e87389f2323576e292bcca1730c2c49bf0eadba..aea5f614fca3fcbd132d562052178fb23340754b 100644 index 5b22f33462dea5491f752d4f50f55d037b381bd3..d20fc029e51f9fbb1dc1da6be242b23490dcebe4 100644
--- a/src/main/java/org/yatopiamc/yatopia/server/YatopiaConfig.java --- a/src/main/java/org/yatopiamc/yatopia/server/YatopiaConfig.java
+++ b/src/main/java/org/yatopiamc/yatopia/server/YatopiaConfig.java +++ b/src/main/java/org/yatopiamc/yatopia/server/YatopiaConfig.java
@@ -240,4 +240,8 @@ public class YatopiaConfig { @@ -243,4 +243,8 @@ public class YatopiaConfig {
criterionTriggerTick = getBoolean("settings.criterion-triggers.tick", true); criterionTriggerTick = getBoolean("settings.criterion-triggers.tick", true);
} }

View File

@ -45,10 +45,10 @@ index 660f7006690d2eb7e16239faffabfd88a841f426..8d592d79bf994b01c331e8090012c600
PlayerConnection.LOGGER.warn("{} moved wrongly!", this.player.getDisplayName().getString()); PlayerConnection.LOGGER.warn("{} moved wrongly!", this.player.getDisplayName().getString());
} }
diff --git a/src/main/java/org/yatopiamc/yatopia/server/YatopiaConfig.java b/src/main/java/org/yatopiamc/yatopia/server/YatopiaConfig.java diff --git a/src/main/java/org/yatopiamc/yatopia/server/YatopiaConfig.java b/src/main/java/org/yatopiamc/yatopia/server/YatopiaConfig.java
index aea5f614fca3fcbd132d562052178fb23340754b..688df989493888edb7eff917158fc65a24a9b20e 100644 index d20fc029e51f9fbb1dc1da6be242b23490dcebe4..2329a3d4c3aaa660a0c824bb44be0b563949b917 100644
--- a/src/main/java/org/yatopiamc/yatopia/server/YatopiaConfig.java --- a/src/main/java/org/yatopiamc/yatopia/server/YatopiaConfig.java
+++ b/src/main/java/org/yatopiamc/yatopia/server/YatopiaConfig.java +++ b/src/main/java/org/yatopiamc/yatopia/server/YatopiaConfig.java
@@ -244,4 +244,15 @@ public class YatopiaConfig { @@ -247,4 +247,15 @@ public class YatopiaConfig {
private static void fireBlockPhysicsEvent() { private static void fireBlockPhysicsEvent() {
fireBlockPhysicsEvent = getBoolean("settings.fire-block-physics-event", true); fireBlockPhysicsEvent = getBoolean("settings.fire-block-physics-event", true);
} }

View File

@ -31,10 +31,10 @@ index 7d81c45f8b514df1a9dafd3b1294a9ad852251f8..4b1cb089355b455c6210f2df1af797cc
this.l = this.k; this.l = this.k;
EntityHuman entityhuman = this.world.a((double) this.position.getX() + 0.5D, (double) this.position.getY() + 0.5D, (double) this.position.getZ() + 0.5D, 3.0D, false); EntityHuman entityhuman = this.world.a((double) this.position.getX() + 0.5D, (double) this.position.getY() + 0.5D, (double) this.position.getZ() + 0.5D, 3.0D, false);
diff --git a/src/main/java/org/yatopiamc/yatopia/server/YatopiaConfig.java b/src/main/java/org/yatopiamc/yatopia/server/YatopiaConfig.java diff --git a/src/main/java/org/yatopiamc/yatopia/server/YatopiaConfig.java b/src/main/java/org/yatopiamc/yatopia/server/YatopiaConfig.java
index 688df989493888edb7eff917158fc65a24a9b20e..1eb56babfea75054dffd4c6b9cb00ddd93ebdf96 100644 index 2329a3d4c3aaa660a0c824bb44be0b563949b917..99e6998782b28b2955005b3333e4c2fe7b3fb2bc 100644
--- a/src/main/java/org/yatopiamc/yatopia/server/YatopiaConfig.java --- a/src/main/java/org/yatopiamc/yatopia/server/YatopiaConfig.java
+++ b/src/main/java/org/yatopiamc/yatopia/server/YatopiaConfig.java +++ b/src/main/java/org/yatopiamc/yatopia/server/YatopiaConfig.java
@@ -255,4 +255,9 @@ public class YatopiaConfig { @@ -258,4 +258,9 @@ public class YatopiaConfig {
checkVehicleMovedQuickly = getBoolean("settings.checks.vehicle-moved-quickly", checkVehicleMovedQuickly); checkVehicleMovedQuickly = getBoolean("settings.checks.vehicle-moved-quickly", checkVehicleMovedQuickly);
checkVehicleMovedWrongly = getBoolean("settings.checks.vehicle-moved-wrongly", checkVehicleMovedWrongly); checkVehicleMovedWrongly = getBoolean("settings.checks.vehicle-moved-wrongly", checkVehicleMovedWrongly);
} }

View File

@ -24,10 +24,10 @@ index 3e89b266240c32e36a7b2eb49fb87fcd8b3659e5..d825c6b8e46e2a699bdc22d081d627ed
public void sendScoreboard(ScoreboardServer scoreboardserver, EntityPlayer entityplayer) { public void sendScoreboard(ScoreboardServer scoreboardserver, EntityPlayer entityplayer) {
diff --git a/src/main/java/org/yatopiamc/yatopia/server/YatopiaConfig.java b/src/main/java/org/yatopiamc/yatopia/server/YatopiaConfig.java diff --git a/src/main/java/org/yatopiamc/yatopia/server/YatopiaConfig.java b/src/main/java/org/yatopiamc/yatopia/server/YatopiaConfig.java
index 1eb56babfea75054dffd4c6b9cb00ddd93ebdf96..b246e6450130964cf91d0be81fbddae6598d9d8c 100644 index 99e6998782b28b2955005b3333e4c2fe7b3fb2bc..6e925920b61d266aff91d910318d05b68430d5f7 100644
--- a/src/main/java/org/yatopiamc/yatopia/server/YatopiaConfig.java --- a/src/main/java/org/yatopiamc/yatopia/server/YatopiaConfig.java
+++ b/src/main/java/org/yatopiamc/yatopia/server/YatopiaConfig.java +++ b/src/main/java/org/yatopiamc/yatopia/server/YatopiaConfig.java
@@ -260,4 +260,10 @@ public class YatopiaConfig { @@ -263,4 +263,10 @@ public class YatopiaConfig {
private static void tickEnchantingTables() { private static void tickEnchantingTables() {
shouldTickEnchantingTables = getBoolean("settings.tick.enchanting-tables", shouldTickEnchantingTables); shouldTickEnchantingTables = getBoolean("settings.tick.enchanting-tables", shouldTickEnchantingTables);
} }

View File

@ -18,10 +18,10 @@ index 95d570bf29ca213808fd8382161a7437bcea4283..c3955c0c48861ead0b0ea1724257ec8c
org.spigotmc.WatchdogThread.tick(); // Paper org.spigotmc.WatchdogThread.tick(); // Paper
org.spigotmc.WatchdogThread.hasStarted = true; // Paper org.spigotmc.WatchdogThread.hasStarted = true; // Paper
diff --git a/src/main/java/org/yatopiamc/yatopia/server/YatopiaConfig.java b/src/main/java/org/yatopiamc/yatopia/server/YatopiaConfig.java diff --git a/src/main/java/org/yatopiamc/yatopia/server/YatopiaConfig.java b/src/main/java/org/yatopiamc/yatopia/server/YatopiaConfig.java
index b246e6450130964cf91d0be81fbddae6598d9d8c..fce7ce0efca340cf5820cdcbe010c9fdeae7cafc 100644 index 6e925920b61d266aff91d910318d05b68430d5f7..9e33411f1489758fd80a476004906eab2a18afea 100644
--- a/src/main/java/org/yatopiamc/yatopia/server/YatopiaConfig.java --- a/src/main/java/org/yatopiamc/yatopia/server/YatopiaConfig.java
+++ b/src/main/java/org/yatopiamc/yatopia/server/YatopiaConfig.java +++ b/src/main/java/org/yatopiamc/yatopia/server/YatopiaConfig.java
@@ -266,4 +266,9 @@ public class YatopiaConfig { @@ -269,4 +269,9 @@ public class YatopiaConfig {
logPlayerLoginLoc = getBoolean("settings.log-player-login-location", logPlayerLoginLoc); logPlayerLoginLoc = getBoolean("settings.log-player-login-location", logPlayerLoginLoc);
} }