From 2f83cb31002add6bdbf56439af3764312c519a7d Mon Sep 17 00:00:00 2001 From: gnembon Date: Fri, 27 Sep 2019 11:00:51 -0500 Subject: [PATCH 1/2] added option to display rules from category --- src/main/java/carpet/commands/TestCommand.java | 5 ++++- src/main/java/carpet/settings/SettingsManager.java | 4 +++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/src/main/java/carpet/commands/TestCommand.java b/src/main/java/carpet/commands/TestCommand.java index 469c8e5a..63cace57 100644 --- a/src/main/java/carpet/commands/TestCommand.java +++ b/src/main/java/carpet/commands/TestCommand.java @@ -16,7 +16,10 @@ public class TestCommand public static void register(CommandDispatcher dispatcher) { dispatcher.register(literal("test"). - then(literal("dump").executes((c) -> CarpetServer.settingsManager.printAllRulesToLog())). + then(literal("dump"). + executes((c) -> CarpetServer.settingsManager.printAllRulesToLog(null)). + then(argument("category", word()). + executes( (c) -> CarpetServer.settingsManager.printAllRulesToLog(getString(c, "category"))))). then(argument("first",word()). executes( (c)-> test(c, getString(c, "first")+" 1"))). then(argument("second", word()). diff --git a/src/main/java/carpet/settings/SettingsManager.java b/src/main/java/carpet/settings/SettingsManager.java index 1aa248b6..39cb6438 100644 --- a/src/main/java/carpet/settings/SettingsManager.java +++ b/src/main/java/carpet/settings/SettingsManager.java @@ -257,13 +257,15 @@ public class SettingsManager }).collect(ImmutableList.toImmutableList()); } - public int printAllRulesToLog() + public int printAllRulesToLog(String category) { PrintStream ps = System.out; ps.println("# "+fancyName+" Settings"); for (Map.Entry> e : new TreeMap<>(rules).entrySet()) { ParsedRule rule = e.getValue(); + if (category != null && !rule.categories.contains(category)) + continue; ps.println("## " + rule.name); ps.println(rule.description+" "); for (String extra : rule.extraInfo) From b4aa0e75096d24439220fd8eeddcdd54b50f03d8 Mon Sep 17 00:00:00 2001 From: gnembon Date: Fri, 27 Sep 2019 11:16:32 -0500 Subject: [PATCH 2/2] updated readme --- README.md | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/README.md b/README.md index 3b0bd2e7..d58609cd 100644 --- a/README.md +++ b/README.md @@ -153,6 +153,14 @@ use '_' to use the startup setting from server.properties * Suggested options: `_` * Categories: `CREATIVE` +## defaultLoggers +sets these loggers in their default configurations for all new players +use csv, like 'tps,mobcaps' for multiple loggers, none for nothing +* Type: `String` +* Default value: `none` +* Suggested options: `none`, `tps`, `mobcaps,tps` +* Categories: `CREATIVE`, `SURVIVAL` + ## desertShrubs Saplings turn into dead shrubs in hot climates and no water access * Type: `boolean` @@ -269,6 +277,14 @@ Customizable maximal entity collision limits, 0 for no limits * Additional notes: * Must be a positive number +## miningGhostBlockFix +Fixes mining ghost blocks by trusting clients with block breaking +Increases player allowed mining distance to 32 blocks +* Type: `boolean` +* Default value: `false` +* Required options: `true`, `false` +* Categories: `SURVIVAL` + ## missingTools Pistons, Glass and Sponge can be broken faster with their appropriate tools * Type: `boolean` @@ -374,6 +390,14 @@ Rotates block anti-clockwise if possible * Required options: `true`, `false` * Categories: `FEATURE` +## scriptsAutoload +Scarpet script from world files will autoload on server/world start +if /script is enabled +* Type: `boolean` +* Default value: `false` +* Required options: `true`, `false` +* Categories: `CREATIVE` + ## shulkerSpawningInEndCities Shulkers will respawn in end cities * Type: `boolean`