pre update for config comment I18n support

This commit is contained in:
Helvetica Volubi
2026-07-24 20:34:55 +08:00
parent 1cbb19d9e4
commit 5f718d45a1
115 changed files with 522 additions and 677 deletions
@@ -11,58 +11,39 @@ import org.leavesmc.leaves.command.bot.BotCommand;
import java.util.Set;
@ConfigClassInfo(
category = EnumConfigCategory.ROOT,
name = "fakeplayer",
directory = {"carpet"},
comments = """
Carpet fakeplayer compatibility mapped onto Lophine fakeplayers.
commandPlayer is currently backed by Lophine's /bot command surface."""
)
@ConfigClassInfo(category = EnumConfigCategory.ROOT, name = "fakeplayer", directory = {"carpet"})
public class FakePlayerCompatConfig implements IConfigModule {
@ConfigInfo(name = "commandPlayer", comments = """
Enable /player command.(not remapped)
If you want to enable bot command, please see lophine global config.""")
@ConfigInfo(name = "commandPlayer")
public static boolean commandPlayer = false;
@ConfigInfo(name = "fakePlayerResident", comments = """
Keep fakeplayers resident across unload and restart.""")
@ConfigInfo(name = "fakePlayerResident")
public static boolean fakePlayerResident = false;
@ConfigInfo(name = "openFakePlayerInventory", comments = """
Allow opening fakeplayer inventories.""")
@ConfigInfo(name = "openFakePlayerInventory")
public static boolean openFakePlayerInventory = false;
@ConfigInfo(name = "fakePlayerTicksLikeRealPlayer", comments = """
Tick fakeplayers in the network phase to better match real player timing.""")
@ConfigInfo(name = "fakePlayerTicksLikeRealPlayer")
public static boolean fakePlayerTicksLikeRealPlayer = false;
@ConfigInfo(name = "fakePlayerDefaultSurvivalMode", comments = """
Force newly created fakeplayers to start in survival instead of the server default gamemode.""")
@ConfigInfo(name = "fakePlayerDefaultSurvivalMode")
public static boolean fakePlayerDefaultSurvivalMode = false;
@ConfigInfo(name = "fakePlayerInteractLikeClient", comments = """
Make fakeplayer entity interaction follow client-side fallback behavior more closely.""")
@ConfigInfo(name = "fakePlayerInteractLikeClient")
public static boolean fakePlayerInteractLikeClient = false;
@ConfigInfo(name = "fakePlayerAutoReplaceTool", comments = """
Toggle automatic tool replacement for fakeplayers.""")
@ConfigInfo(name = "fakePlayerAutoReplaceTool")
public static boolean fakePlayerAutoReplaceTool = false;
@ConfigInfo(name = "fakePlayerAutoReplenishment", comments = """
Toggle automatic stack replenishment for fakeplayers.""")
@ConfigInfo(name = "fakePlayerAutoReplenishment")
public static boolean fakePlayerAutoReplenishment = false;
@ConfigInfo(name = "fakePlayerAutoReplenishmentFormShulkerBox", comments = """
Let fakeplayer replenishment pull matching items out of shulker boxes in the inventory.""")
@ConfigInfo(name = "fakePlayerAutoReplenishmentFormShulkerBox")
public static boolean fakePlayerAutoReplenishmentFormShulkerBox = false;
@ConfigInfo(name = "fakePlayerAutoFish", comments = """
Let fakeplayers holding a fishing rod automatically cast and reel it in.""")
@ConfigInfo(name = "fakePlayerAutoFish")
public static boolean fakePlayerAutoFish = false;
@ConfigInfo(name = "fakePlayerReloadAction", comments = """
Persist queued fakeplayer actions across save and reload.""")
@ConfigInfo(name = "fakePlayerReloadAction")
public static boolean fakePlayerReloadAction = false;
@DoNotLoad
@@ -8,248 +8,174 @@ import me.earthme.luminol.enums.EnumConfigCategory;
import java.util.List;
@ConfigClassInfo(
category = EnumConfigCategory.ROOT,
name = "general",
directory = {"carpet"},
comments = """
Carpet/AMS/TIS/Org compatibility rules backed by existing Lophine features.
Only rules that already have a working server-side implementation are exposed here."""
)
@ConfigClassInfo(category = EnumConfigCategory.ROOT, name = "general", directory = {"carpet"})
public class GeneralCompatConfig implements IConfigModule {
@ConfigInfo(name = "language", comments = """
Carpet language value.
ATTENTION: This config will not update in Lophine global now!""")
@ConfigInfo(name = "language")
public static String language = "en_us";
@ConfigInfo(name = "amsUpdateSuppressionCrashFix", comments = """
Update suppression crash protection.""")
@ConfigInfo(name = "amsUpdateSuppressionCrashFix")
public static boolean amsUpdateSuppressionCrashFix = false;
@ConfigInfo(name = "yeetUpdateSuppressionCrash", comments = """
Update suppression crash yeeting.""")
@ConfigInfo(name = "yeetUpdateSuppressionCrash")
public static boolean yeetUpdateSuppressionCrash = false;
@ConfigInfo(name = "dustTrapdoorReintroduced", comments = """
Should the pre-1.20 mechanism be reintroduced:
Redstone dust does not connect to adjacent redstone dust on trapdoors that are open
Pre-1.20.2 mechanism: Redstone dust, redstone repeaters,
and redstone comparators do not check for attachment when receiving status updates from below.""")
@ConfigInfo(name = "dustTrapdoorReintroduced")
public static boolean dustTrapdoorReintroduced = false;
@ConfigInfo(name = "shulkerBoxCCEReintroduced", comments = """
Use ClassCastException for update suppression.""")
@ConfigInfo(name = "shulkerBoxCCEReintroduced")
public static boolean shulkerBoxCCEReintroduced = false;
@ConfigInfo(name = "instantBlockUpdaterReintroduced", comments = """
Instant block updater.""")
@ConfigInfo(name = "instantBlockUpdaterReintroduced")
public static boolean instantBlockUpdaterReintroduced = false;
@ConfigInfo(name = "commandTick", comments = """
Enable the tick command support.""")
@ConfigInfo(name = "commandTick")
public static boolean commandTick = false;
@ConfigInfo(name = "creativeNoClip", comments = """
Whether to enable creative fly no clip.
When enabled, players in creative mode will not collide with blocks while flying.
This allows them to pass through blocks without obstruction.""")
@ConfigInfo(name = "creativeNoClip")
public static boolean creativeNoClip = false;
@ConfigInfo(name = "optimizedDragonRespawn", comments = """
Enable optimized dragon respawn.""")
@ConfigInfo(name = "optimizedDragonRespawn")
public static boolean optimizedDragonRespawn = false;
@ConfigInfo(name = "antiSpamDisabled", comments = """
Disable the server-side chat and creative-drop spam throttles used by vanilla/Spigot.""")
@ConfigInfo(name = "antiSpamDisabled")
public static boolean antiSpamDisabled = false;
@ConfigInfo(name = "blockPlacementIgnoreEntity", comments = """
Allow creative players to place blocks without entity collision checks.""")
@ConfigInfo(name = "blockPlacementIgnoreEntity")
public static boolean blockPlacementIgnoreEntity = false;
@ConfigInfo(name = "creativeOpenContainerForcibly", comments = """
Allow creative players to forcibly open blocked chests, ender chests and shulker boxes.""")
@ConfigInfo(name = "creativeOpenContainerForcibly")
public static boolean creativeOpenContainerForcibly = false;
@ConfigInfo(name = "creativeOneHitKill", comments = """
Allow creative players to instantly kill attackable non-creative, non-spectator entities.
Sneaking expands the effect into a small area attack.""")
@ConfigInfo(name = "creativeOneHitKill")
public static boolean creativeOneHitKill = false;
@ConfigInfo(name = "observerNoDetection", comments = """
Disable observer detection pulses entirely.""")
@ConfigInfo(name = "observerNoDetection")
public static boolean observerNoDetection = false;
@ConfigInfo(name = "bambooModelNoOffset", comments = """
Remove the random horizontal model offset from bamboo and bamboo saplings.""")
@ConfigInfo(name = "bambooModelNoOffset")
public static boolean bambooModelNoOffset = false;
@ConfigInfo(name = "creativeNoItemCooldown", comments = """
Skip item cooldown application for creative players.""")
@ConfigInfo(name = "creativeNoItemCooldown")
public static boolean creativeNoItemCooldown = false;
@ConfigInfo(name = "ctrlQCraftingFix", comments = """
Compatibility flag for the upstream result-slot Ctrl+Q crafting fix already present in the current menu code.""")
@ConfigInfo(name = "ctrlQCraftingFix")
public static boolean ctrlQCraftingFix = false;
@ConfigInfo(name = "carpetAlwaysSetDefault", comments = """
Compatibility flag for Lophine's config loader, which already writes default values into the compat config during preload.""")
@ConfigInfo(name = "carpetAlwaysSetDefault")
public static boolean carpetAlwaysSetDefault = false;
@ConfigInfo(name = "placementRotationFix", comments = """
Use the player's main body rotation for placement direction checks instead of interpolated head yaw.""")
@ConfigInfo(name = "placementRotationFix")
public static boolean placementRotationFix = false;
@ConfigInfo(name = "tntDoNotUpdate", comments = """
Prevent TNT from checking redstone power when first placed.""")
@ConfigInfo(name = "tntDoNotUpdate")
public static boolean tntDoNotUpdate = false;
@ConfigInfo(name = "totallyNoBlockUpdate", comments = """
Suppress neighbor and shape updates globally for block changes.""")
@ConfigInfo(name = "totallyNoBlockUpdate")
public static boolean totallyNoBlockUpdate = false;
@ConfigInfo(name = "tiscmNetworkProtocol", comments = """
Enable the native Carpet TIS Addition network channel on `tiscm:network/v1`.""")
@ConfigInfo(name = "tiscmNetworkProtocol")
public static boolean tiscmNetworkProtocol = false;
@ConfigInfo(name = "hopperNoItemCost", comments = """
Restore the transferred stack into a hopper when a wool block is placed on top of it.""")
@ConfigInfo(name = "hopperNoItemCost")
public static boolean hopperNoItemCost = false;
@ConfigInfo(name = "explosionNoBlockDamage", comments = """
Let explosions damage entities without breaking blocks.""")
@ConfigInfo(name = "explosionNoBlockDamage")
public static boolean explosionNoBlockDamage = false;
@ConfigInfo(name = "noCreeperBlockBreaking", comments = """
Disables creeper explosion block breaking.""")
@ConfigInfo(name = "noCreeperBlockBreaking")
public static boolean noCreeperBlockBreaking = false;
@ConfigInfo(name = "noGhastBlockBreaking", comments = """
Disables ghast fireball explosion block breaking.""")
@ConfigInfo(name = "noGhastBlockBreaking")
public static boolean noGhastBlockBreaking = false;
@ConfigInfo(name = "disableBlazeFire", comments = """
Disables fire made from blaze fireballs.""")
@ConfigInfo(name = "disableBlazeFire")
public static boolean disableBlazeFire = false;
@ConfigInfo(name = "disableGhastFire", comments = """
Disables fire made from ghast fireballs.""")
@ConfigInfo(name = "disableGhastFire")
public static boolean disableGhastFire = false;
@ConfigInfo(name = "optimizedTNTHighPriority", comments = """
Compatibility flag for the already optimized server explosion path carried by the current runtime.""")
@ConfigInfo(name = "optimizedTNTHighPriority")
public static boolean optimizedTNTHighPriority = false;
@ConfigInfo(name = "tntPrimerMomentumRemoved", comments = """
Remove the random horizontal launch momentum from newly primed TNT.""")
@ConfigInfo(name = "tntPrimerMomentumRemoved")
public static boolean tntPrimerMomentumRemoved = false;
@ConfigInfo(name = "tntIgnoreRedstoneSignal", comments = """
Ignore redstone power when deciding whether TNT should auto-prime.""")
@ConfigInfo(name = "tntIgnoreRedstoneSignal")
public static boolean tntIgnoreRedstoneSignal = false;
@ConfigInfo(name = "tntDupingFix", comments = """
Toggle the piston desync path used by vanilla TNT duplication setups.""")
@ConfigInfo(name = "tntDupingFix")
public static boolean tntDupingFix = false;
@ConfigInfo(name = "interactionUpdates", comments = """
Control whether player interaction block changes emit normal block updates.
Set to false to suppress neighbor and shape updates during block use and breaking.""")
@ConfigInfo(name = "interactionUpdates")
public static boolean interactionUpdates = true;
@ConfigInfo(name = "xpNoCooldown", comments = """
Allow players to absorb multiple experience orbs in the same tick without pickup delay.""")
@ConfigInfo(name = "xpNoCooldown")
public static boolean xpNoCooldown = false;
@ConfigInfo(name = "powerfulExpMending", comments = """
Let picked-up experience repair all damaged mending items in the player's inventory, not only equipped gear.""")
@ConfigInfo(name = "powerfulExpMending")
public static boolean powerfulExpMending = false;
@ConfigInfo(name = "clientSettingsLostOnRespawnFix", comments = """
Reapply the player's last known client settings after respawn.""")
@ConfigInfo(name = "clientSettingsLostOnRespawnFix")
public static boolean clientSettingsLostOnRespawnFix = false;
@ConfigInfo(name = "sensibleEnderman", comments = """
Restrict enderman block pickup to pumpkins and melons only.""")
@ConfigInfo(name = "sensibleEnderman")
public static boolean sensibleEnderman = false;
@ConfigInfo(name = "entityInstantDeathRemoval", comments = """
Remove the normal 20gt delay before dead living entities are discarded.""")
@ConfigInfo(name = "entityInstantDeathRemoval")
public static boolean entityInstantDeathRemoval = false;
@ConfigInfo(name = "farmlandTrampledDisabled", comments = """
Prevent farmland from turning into dirt when entities land on it.""")
@ConfigInfo(name = "farmlandTrampledDisabled")
public static boolean farmlandTrampledDisabled = false;
@ConfigInfo(name = "shulkerGolem", comments = """
Allow a carved pumpkin on top of a shulker box to summon a shulker.""")
@ConfigInfo(name = "shulkerGolem")
public static boolean shulkerGolem = false;
@ConfigInfo(name = "preventEndSpikeRespawn", comments = """
Skip obsidian spike regeneration during dragon respawn.""")
@ConfigInfo(name = "preventEndSpikeRespawn")
public static boolean preventEndSpikeRespawn = false;
@ConfigInfo(name = "yeetOutOfOrderChatKick", comments = """
Ignore out-of-order secure chat chain checks instead of invalidating the chat session.""")
@ConfigInfo(name = "yeetOutOfOrderChatKick")
public static boolean yeetOutOfOrderChatKick = false;
@ConfigInfo(name = "betterCraftableBoneBlock", comments = """
Add the AMS alternate bone block recipe that yields 3 bone blocks from 9 bones.""")
@ConfigInfo(name = "betterCraftableBoneBlock")
public static boolean betterCraftableBoneBlock = false;
@ConfigInfo(name = "betterCraftableDispenser", comments = """
Add the AMS alternate dispenser recipes using a dropper.""")
@ConfigInfo(name = "betterCraftableDispenser")
public static boolean betterCraftableDispenser = false;
@ConfigInfo(name = "viewDistance", comments = """
Override the dedicated server's startup view distance with the Carpet-compatible value.""")
@ConfigInfo(name = "viewDistance")
public static int viewDistance = 12;
@ConfigInfo(name = "tickCommandPermission", comments = """
Override the `/tick` command permission level.
Accepts values in the range 0..4, where 2 matches old Carpet behavior and 3 keeps vanilla.""")
@ConfigInfo(name = "tickCommandPermission")
public static int tickCommandPermission = 3;
@ConfigInfo(name = "tickFreezeCommandToggleable", comments = """
Make `/tick freeze` toggle back to running when executed while the server is already frozen.""")
@ConfigInfo(name = "tickFreezeCommandToggleable")
public static boolean tickFreezeCommandToggleable = false;
@ConfigInfo(name = "syncServerMsptMetricsData", comments = """
Broadcast live MSPT samples through the native TISCM protocol channel.""")
@ConfigInfo(name = "syncServerMsptMetricsData")
public static boolean syncServerMsptMetricsData = false;
@ConfigInfo(name = "simpleInGameCalculator", comments = """
Evaluate chat messages prefixed with `=` as a simple calculator expression and reply privately.""")
@ConfigInfo(name = "simpleInGameCalculator")
public static boolean simpleInGameCalculator = false;
@ConfigInfo(name = "microTiming", comments = """
Compatibility flag for the built-in region profiler and timing instrumentation carried by Folia/Moonrise.""")
@ConfigInfo(name = "microTiming")
public static boolean microTiming = false;
@ConfigInfo(name = "fastRedstoneDust", comments = """
Route redstone dust updates through the Alternate Current fast-update backend.""")
@ConfigInfo(name = "fastRedstoneDust")
public static boolean fastRedstoneDust = false;
@ConfigInfo(name = "lagFreeSpawning", comments = """
Use the lightweight collision and precooked-mob spawning path for natural spawning checks.""")
@ConfigInfo(name = "lagFreeSpawning")
public static boolean lagFreeSpawning = false;
@ConfigInfo(name = "optimizedFastEntityMovement", comments = """
Compatibility flag for the always-on Moonrise/Paper fast entity movement collision pipeline.""")
@ConfigInfo(name = "optimizedFastEntityMovement")
public static boolean optimizedFastEntityMovement = false;
@ConfigInfo(name = "optimizedHardHitBoxEntityCollision", comments = """
Compatibility flag for the always-on Moonrise/Paper hard-hitbox entity collision optimizations.""")
@ConfigInfo(name = "optimizedHardHitBoxEntityCollision")
public static boolean optimizedHardHitBoxEntityCollision = false;
@ConfigInfo(name = "tntFuseDuration", comments = """
Override the default primed TNT fuse duration in ticks.
Accepts values in the range 0..32767.""")
@ConfigInfo(name = "tntFuseDuration")
public static int tntFuseDuration = 80;
@ConfigInfo(name = "defaultLoggers", comments = """
Carpet-style default logger subscriptions for players.
Examples: ["tps", "mob_caps", "counter white"]""")
@ConfigInfo(name = "defaultLoggers")
public static List<String> defaultLoggers = List.of();
public static boolean mergedUpdateSuppressionCrashEnabled() {
@@ -7,8 +7,6 @@ import me.earthme.luminol.enums.EnumConfigCategory;
@ConfigClassInfo(category = EnumConfigCategory.REMOVED, name = "removed_config")
public class RemovedConfig implements IConfigModule {
@ConfigInfo(name = "removed", comments =
"""
RemovedConfig redirect to here, no any function.""")
@ConfigInfo(name = "removed")
public static boolean enabled = true;
}
@@ -11,21 +11,12 @@ import org.jetbrains.annotations.Nullable;
import java.util.Set;
@ConfigClassInfo(
category = EnumConfigCategory.ROOT,
name = "hopper_counter",
directory = {"carpet"},
comments = """
Hopper counter functions."""
)
@ConfigClassInfo(category = EnumConfigCategory.ROOT, name = "hopper_counter", directory = {"carpet"})
public class WoolHopperCounterConfig implements IConfigModule {
@ConfigInfo(name = "hopperCounters", comments = """
Enable the existing wool hopper counter implementation.""")
@ConfigInfo(name = "hopperCounters")
public static boolean hopperCounters = false;
@ConfigInfo(name = "hopperCountersUnlimitedSpeed", comments = """
Remove the hopper transfer speed limit for counters.
Only effective when hopperCounters is enabled.""")
@ConfigInfo(name = "hopperCountersUnlimitedSpeed")
public static boolean hopperCountersUnlimitedSpeed = false;
@DoNotLoad
@@ -7,32 +7,21 @@ import me.earthme.luminol.enums.EnumConfigCategory;
@ConfigClassInfo(category = EnumConfigCategory.EXPERIMENT, name = "command")
public class CommandConfig implements IConfigModule {
@ConfigInfo(name = "trigger_command_enabled", comments =
"""
Allow to use trigger command""")
@ConfigInfo(name = "trigger_command_enabled")
public static boolean trigger = false;
@ConfigInfo(name = "function_command_enabled", comments =
"""
Allow to use function command""")
@ConfigInfo(name = "function_command_enabled")
public static boolean function = false;
@ConfigInfo(name = "scoreboard_command_enabled", comments =
"""
Allow to use scoreboard command""")
@ConfigInfo(name = "scoreboard_command_enabled")
public static boolean scoreboard = false;
@ConfigInfo(name = "enabled", directory = {"save_all_command"}, comments =
"""
Allow to use save-all command""")
@ConfigInfo(name = "enabled", directory = {"save_all_command"})
public static boolean saveAll = false;
@ConfigInfo(name = "log_all_process", directory = {"save_all_command"}, comments =
"""
Log all process of save-all command to console""")
@ConfigInfo(name = "log_all_process", directory = {"save_all_command"})
public static boolean logAllProcess = false;
@ConfigInfo(name = "save_all_command_timeout", directory = {"save_all_command"}, comments = """
Maximum seconds to save before the chunk report it is timeout.""")
@ConfigInfo(name = "save_all_command_timeout", directory = {"save_all_command"})
public static long saveAllTimeout = 30;
}
@@ -7,8 +7,6 @@ import me.earthme.luminol.enums.EnumConfigCategory;
@ConfigClassInfo(category = EnumConfigCategory.EXPERIMENT, name = "entity_damage_source_trace")
public class EntityDamageSourceTraceConfig implements IConfigModule {
@ConfigInfo(name = "enabled", comments =
"""
Allow trace damage source cross different Region Scheduler.""")
@ConfigInfo(name = "enabled")
public static boolean enabled = false;
}
@@ -13,13 +13,7 @@ import me.earthme.luminol.enums.EnumConfigCategory;
@ConfigClassInfo(name = "global_entities_counter", category = EnumConfigCategory.EXPERIMENT)
public class GlobalEntitiesCounter implements IConfigModule {
@HotReloadUnsupported
@ConfigInfo(name = "version", comments = """
DISABLED
DEFAULT_SYNC: Enable global entities counter origin version with sync counter module.
DEFAULT_ASYNC: Enable global entities counter origin version with async counter module.
PRECISE: Enable precise mob cap calculation with incremental counting. Replaces the periodic full-scan with event-driven real-time updates.
You need to set per-player-mob-spawns to false on paper-world-defaults.yml or paper-world.yml""")
@ConfigInfo(name = "version")
public static GlobalEntitiesCounterType type = GlobalEntitiesCounterType.DISABLED;
@DoNotLoad
@@ -7,7 +7,6 @@ import me.earthme.luminol.enums.EnumConfigCategory;
@ConfigClassInfo(category = EnumConfigCategory.FIXES, name = "update-suppression-crash-fix")
public class UpdateSuppressionCrashFixConfig implements IConfigModule {
@ConfigInfo(name = "enabled", comments = """
Should crash caused by update suppression be prevented?""")
@ConfigInfo(name = "enabled")
public static boolean enabled = true;
}
@@ -7,7 +7,6 @@ import me.earthme.luminol.enums.EnumConfigCategory;
@ConfigClassInfo(category = EnumConfigCategory.FIXES, name = "vanilla-like-experience")
public class VanillaLikeExperienceConfig implements IConfigModule {
@ConfigInfo(name = "enabled", comments = """
Restore a more vanilla-like technical gameplay experience by bypassing some Paper safety and behavior changes.""")
@ConfigInfo(name = "enabled")
public static boolean enabled = false;
}
@@ -11,22 +11,16 @@ import me.earthme.luminol.enums.EnumConfigCategory;
public class ContainerExpansionConfig implements IConfigModule {
@HotReloadUnsupported
@CommandSuggestions(suggest = {"1", "2", "3", "4", "5", "6"})
@ConfigInfo(name = "barrel_rows", comments =
"""
range: 1~6""")
@ConfigInfo(name = "barrel_rows")
public static int barrelRows = 3;
@HotReloadUnsupported
@CommandSuggestions(suggest = {"1", "2", "3", "4", "5", "6"})
@ConfigInfo(name = "enderchest_rows", comments =
"""
range: 1~6""")
@ConfigInfo(name = "enderchest_rows")
public static int enderchestRows = 3;
@CommandSuggestions(suggest = {"1", "2", "32", "64"})
@ConfigInfo(name = "shulker_stackable_count", directory = {"shulker_box"}, comments =
"""
range: 1~64""")
@ConfigInfo(name = "shulker_stackable_count", directory = {"shulker_box"})
public static int shulkerCount = 1;
@ConfigInfo(name = "same_nbt_shulker_stackable", directory = {"shulker_box"})
@@ -16,69 +16,52 @@ import java.util.Set;
@ConfigClassInfo(category = EnumConfigCategory.FUNCTION, name = "fakeplayer")
public class FakeplayerConfig implements IConfigModule {
@ConfigInfo(name = "enable", comments = """
Enable fakeplayer functionality (/bot command)""")
@ConfigInfo(name = "enable")
public static boolean enable = true;
@ConfigInfo(name = "unable-fakeplayer-names", comments = """
List of names that cannot be used for fakeplayers""")
@ConfigInfo(name = "unable-fakeplayer-names")
public static List<String> unableNames = List.of("player-name");
@ConfigInfo(name = "limit", comments = """
Maximum number of fakeplayers allowed""")
@ConfigInfo(name = "limit")
public static int limit = 10;
@ConfigInfo(name = "prefix", comments = """
Prefix for fakeplayer names""")
@ConfigInfo(name = "prefix")
public static String prefix = "";
@ConfigInfo(name = "suffix", comments = """
Suffix for fakeplayer names""")
@ConfigInfo(name = "suffix")
public static String suffix = "";
@ConfigInfo(name = "regen-amount", comments = """
Regeneration amount for fakeplayers""")
@ConfigInfo(name = "regen-amount")
public static double regenAmount = 0.0;
@ConfigInfo(name = "open-action-gui", comments = """
Allow opening fakeplayer action gui,
need sneak to open if you enabled inventory open gui""")
@ConfigInfo(name = "open-action-gui")
public static boolean canOpenActionGui = false;
@ConfigInfo(name = "use-action", comments = """
Allow fakeplayers to use actions""")
@ConfigInfo(name = "use-action")
public static boolean canUseAction = true;
@ConfigInfo(name = "modify-config", comments = """
Allow modifying fakeplayer config""")
@ConfigInfo(name = "modify-config")
public static boolean canModifyConfig = false;
@ConfigInfo(name = "manual-save-and-load", comments = """
Allow manual save and load of fakeplayers""")
@ConfigInfo(name = "manual-save-and-load")
public static boolean canManualSaveAndLoad = false;
@ConfigInfo(name = "cache-skin", comments = """
Use skin cache for fakeplayers""")
@ConfigInfo(name = "cache-skin")
public static boolean useSkinCache = false;
@ConfigInfo(name = "always-send-data", comments = """
Always send data for fakeplayers""")
@ConfigInfo(name = "always-send-data")
public static boolean canSendDataAlways = true;
@ConfigInfo(name = "skip-sleep-check", comments = """
Skip sleep check for fakeplayers""")
@ConfigInfo(name = "skip-sleep-check")
public static boolean canSkipSleep = false;
@ConfigInfo(name = "spawn-phantom", comments = """
Allow phantoms to spawn for fakeplayers""")
@ConfigInfo(name = "spawn-phantom")
public static boolean canSpawnPhantom = false;
@ConfigInfo(name = "simulation-distance", comments = """
Simulation distance for fakeplayers (-1 for default)""")
@ConfigInfo(name = "simulation-distance")
public static int simulationDistance = -1;
@ConfigInfo(name = "enable-locator-bar", comments = """
Enable locator bar for fakeplayers""")
@ConfigInfo(name = "enable-locator-bar")
public static boolean enableLocatorBar = false;
@DoNotLoad
@@ -9,18 +9,12 @@ import me.earthme.luminol.enums.EnumConfigCategory;
@ConfigClassInfo(category = EnumConfigCategory.FUNCTION, name = "language")
public class LanguageConfig implements IConfigModule {
@HotReloadUnsupported
@ConfigInfo(name = "lang", comments = """
Please use the key from https://minecraft.wiki/w/Language
Sample of format: en_us zh_cn zh_hk zh_tw
ATTENTION: If you want to edit language for carpet system,
please edit it in carpet config file.""")
@ConfigInfo(name = "lang")
public static String lang = "en_us";
@ConfigInfo(name = "full_blocking_load", comments = """
Whether to allow blocking server loading when loading localized language.
If you want only use your localized language to shown in your terminal,
you need to enable it.
WARNING: This may slow down the startup speed!""")
@ConfigInfo(name = "full_blocking_load")
public static boolean full_blocking_load = false;
@ConfigInfo(name = "allow_auto_reset_comments")
public static boolean allowAutoResetComments = true;
}
@@ -22,8 +22,6 @@ public class OldFeatureConfig implements IConfigModule {
@ConfigInfo(name = "old_raid_behavior")
public static boolean oldRaidBehavior = false;
@ConfigInfo(name = "villager-void-trade", comments =
"""
Allow villager void trade.""")
@ConfigInfo(name = "villager-void-trade")
public static boolean villagerVoidTrade = false;
}
@@ -7,8 +7,6 @@ import me.earthme.luminol.enums.EnumConfigCategory;
@ConfigClassInfo(category = EnumConfigCategory.FUNCTION, name = "redstone")
public class RedStoneConfig implements IConfigModule {
@ConfigInfo(name = "shears_rotate", comments =
"""
Allows you to use the Shears to right-click to rotate the block.""")
@ConfigInfo(name = "shears_rotate")
public static boolean shears = false;
}
@@ -18,13 +18,11 @@ public class ReplayAPIConfig implements IConfigModule {
public static boolean enableCache = true;
@HotReloadUnsupported
@ConfigInfo(name = "cache-photographer-time", comments = """
Time to cache photographer profile(in seconds)""")
@ConfigInfo(name = "cache-photographer-time")
public static int cachePhotographerTime = 3600;
@HotReloadUnsupported
@ConfigInfo(name = "cache-photographer-size", comments = """
Maximum size of cache photographer profile""")
@ConfigInfo(name = "cache-photographer-size")
public static int cachePhotographerSize = 100;
@Override
@@ -8,12 +8,7 @@ import me.earthme.luminol.enums.EnumConfigCategory;
@ConfigClassInfo(category = EnumConfigCategory.FUNCTION, name = "alternative_block_placement", directory = {"protocol"})
public class AlternativeBlockPlacementProtocolConfig implements IConfigModule {
@ConfigInfo(name = "enabled", comments = """
Specify the precise placement protocol type
NONE Disable precise placement protocol
CARPET Precise placement protocol version 2
CARPET_FIX Enhanced precise placement protocol version 2 (requires MasaGadget installed on client)
LITEMATICA Precise placement protocol version 3""")
@ConfigInfo(name = "enabled")
public static EnumAlternativePlaceType alternativeBlockPlacement = EnumAlternativePlaceType.NONE;
public static boolean needIgnoreDistance() {
@@ -7,10 +7,8 @@ import me.earthme.luminol.enums.EnumConfigCategory;
@ConfigClassInfo(category = EnumConfigCategory.FUNCTION, name = "appleskin", directory = {"protocol"})
public class AppleSkinProtocolConfig implements IConfigModule {
@ConfigInfo(name = "enabled", comments = """
Enable AppleSkin protocol support""")
@ConfigInfo(name = "enabled")
public static boolean enabled = false;
@ConfigInfo(name = "sync-tick-interval", comments = """
Set AppleSkin Synchronization Frequency (Unit: Game Ticks)""")
@ConfigInfo(name = "sync-tick-interval")
public static int syncTickInterval = 20;
}
@@ -7,7 +7,6 @@ import me.earthme.luminol.enums.EnumConfigCategory;
@ConfigClassInfo(category = EnumConfigCategory.FUNCTION, name = "bbor", directory = {"protocol"})
public class BBORProtocolConfig implements IConfigModule {
@ConfigInfo(name = "enabled", comments = """
Enable BBOR protocol support""")
@ConfigInfo(name = "enabled")
public static boolean enabled = false;
}
@@ -7,7 +7,6 @@ import me.earthme.luminol.enums.EnumConfigCategory;
@ConfigClassInfo(category = EnumConfigCategory.FUNCTION, name = "jade", directory = {"protocol"})
public class JadeProtocolConfig implements IConfigModule {
@ConfigInfo(name = "enabled", comments = """
Enable Jade protocol support""")
@ConfigInfo(name = "enabled")
public static boolean enabled = false;
}
@@ -1,12 +1,10 @@
package fun.bm.lophine.config.modules.function.protocol;
import com.electronwill.nightconfig.core.file.CommentedFileConfig;
import fun.bm.lophine.carpet.CarpetCompatSync;
import fun.bm.lophine.enums.PcaPlayerEntityType;
import me.earthme.luminol.config.IConfigModule;
import me.earthme.luminol.config.flags.ConfigClassInfo;
import me.earthme.luminol.config.flags.ConfigInfo;
import me.earthme.luminol.config.flags.TransformedConfig;
import me.earthme.luminol.enums.EnumConfigCategory;
import org.jetbrains.annotations.Nullable;
import org.leavesmc.leaves.protocol.PcaSyncProtocol;
@@ -17,19 +15,10 @@ import java.util.Set;
public class PcaSyncProtocolConfig implements IConfigModule {
private static boolean lastEnabled = false;
@TransformedConfig(name = "pca-sync-protocol", directory = {"protocol"})
@ConfigInfo(name = "enabled", comments = """
Enable PCA sync protocol support""")
@ConfigInfo(name = "enabled")
public static boolean enabled = false;
@TransformedConfig(name = "pca-sync-player-entity", directory = {"protocol"})
@ConfigInfo(name = "sync-player-entity", comments = """
Controls which player entities can be watched through the PCA sync protocol.
NOBODY: never sync player entities
BOT: only sync Lophine fake players
OPS: sync fake players and allow operators to sync real players
OPS_AND_SELF: sync fake players, operators, and a player's own entity
EVERYONE: allow all player entities""")
@ConfigInfo(name = "sync-player-entity")
public static PcaPlayerEntityType syncPlayerEntity = PcaPlayerEntityType.OPS;
@Override
@@ -38,6 +27,5 @@ public class PcaSyncProtocolConfig implements IConfigModule {
PcaSyncProtocol.onConfigModify(enabled);
lastEnabled = enabled;
}
CarpetCompatSync.apply();
}
}
@@ -7,7 +7,6 @@ import me.earthme.luminol.enums.EnumConfigCategory;
@ConfigClassInfo(category = EnumConfigCategory.FUNCTION, name = "rei", directory = {"protocol"})
public class REIServerProtocolConfig implements IConfigModule {
@ConfigInfo(name = "enabled", comments = """
Enable Roughly Enough Items protocol support""")
@ConfigInfo(name = "enabled")
public static boolean enabled = false;
}
@@ -39,6 +39,6 @@ public class ServuxProtocolConfig implements IConfigModule {
public static int litematicsMaxNbtSize = 2097152;
@CommandSuggestions(suggest = {"-1", "1200"})
@ConfigInfo(name = "litematics-print-max-delay-ticks", directory = {"litematics"}, comments = "The max delay ticks for printing litematics, -1 to disable")
@ConfigInfo(name = "litematics-print-max-delay-ticks", directory = {"litematics"})
public static int maxDelay = 1200;
}
@@ -12,14 +12,11 @@ import java.util.Set;
@ConfigClassInfo(category = EnumConfigCategory.FUNCTION, name = "syncmatica", directory = {"protocol"})
public class SyncmaticaProtocolConfig implements IConfigModule {
@ConfigInfo(name = "enabled", comments = """
Enable Syncmatica protocol support""")
@ConfigInfo(name = "enabled")
public static boolean enabled = false;
@ConfigInfo(name = "useQuota", comments = """
Is there a limit on the size of projection files?""")
@ConfigInfo(name = "useQuota")
public static boolean useQuota = false;
@ConfigInfo(name = "quota-Limit", comments = """
Maximum Projection File Size (in bytes)""")
@ConfigInfo(name = "quota-Limit")
public static int quotaLimit = 40000000;
public void onLoaded(CommentedFileConfig configInstance, @Nullable Set<Exception> e) {
@@ -9,8 +9,7 @@ import java.util.Random;
@ConfigClassInfo(category = EnumConfigCategory.FUNCTION, name = "xaero-map", directory = {"protocol"})
public class XaeroMapProtocolConfig implements IConfigModule {
@ConfigInfo(name = "enabled", comments = """
Enable Xaero World Map Protocol Support""")
@ConfigInfo(name = "enabled")
public static boolean enabled = false;
@ConfigInfo(name = "xaeroMapServerID")
public static int xaeroMapServerID = new Random().nextInt();
@@ -7,11 +7,9 @@ import me.earthme.luminol.enums.EnumConfigCategory;
@ConfigClassInfo(category = EnumConfigCategory.MISC, name = "disable-check")
public class DisableCheckConfig implements IConfigModule {
@ConfigInfo(name = "disable-op-move-check", comments = """
Disable the check for the operator's move check""")
@ConfigInfo(name = "disable-op-move-check")
public static boolean disableOpMoveCheck = false;
@ConfigInfo(name = "disable-op-fly-check", comments = """
Disable the check for the operator's fly check""")
@ConfigInfo(name = "disable-op-fly-check")
public static boolean disableOpFlyCheck = false;
}
@@ -7,10 +7,6 @@ import me.earthme.luminol.enums.EnumConfigCategory;
@ConfigClassInfo(category = EnumConfigCategory.MISC, name = "item-entity")
public class ItemEntityConfig implements IConfigModule {
@ConfigInfo(name = "follow-tick-sequence-merge", comments = """
Due to Paper's modification of the merge radius,
when the merge radius is large and stacks containing many items get stuck in an unexpected position,
individual items may never reach their destination.
This configuration option is added to fix this behavior.""")
@ConfigInfo(name = "follow-tick-sequence-merge")
public static boolean followTickSequenceMerge = false;
}
@@ -7,8 +7,6 @@ import me.earthme.luminol.enums.EnumConfigCategory;
@ConfigClassInfo(category = EnumConfigCategory.REMOVED, name = "removed_config")
public class RemovedConfig implements IConfigModule {
@ConfigInfo(name = "removed", comments =
"""
RemovedConfig redirect to here, no any function.""")
@ConfigInfo(name = "removed")
public static boolean enabled = true;
}
@@ -271,6 +271,7 @@ public class ServerI18nUtil {
private static void loadLophineI18n(BiConsumer<String, String> bi) {
if (Language.class.getResource(lophineLangPath) != null) {
Language.parseTranslations(bi, lophineLangPath);
if (LanguageConfig.allowAutoResetComments) ConfigManager.reloadComments();
} else {
loadLophineI18nDefault(bi);
}
@@ -297,6 +298,12 @@ public class ServerI18nUtil {
}
}
public static String getLocalizedComment(String key) {
String current = Language.getInstance().getOrDefault(key, "");
if (!current.isBlank()) return current;
return Language.DEFAULT_INSTANCE.getOrDefault(key, "");
}
private static class UnsupportedLanguageException extends Exception {
}