diff --git a/api/src/main/java/net/momirealms/customcrops/api/core/SynchronizedCompoundMap.java b/api/src/main/java/net/momirealms/customcrops/api/core/SynchronizedCompoundMap.java index c463d48..48af31c 100644 --- a/api/src/main/java/net/momirealms/customcrops/api/core/SynchronizedCompoundMap.java +++ b/api/src/main/java/net/momirealms/customcrops/api/core/SynchronizedCompoundMap.java @@ -101,7 +101,7 @@ public class SynchronizedCompoundMap { listJoiner.add(tag2.getValue().toString()); } } - tagValue = tag.getName() + "[" + listJoiner + "]"; + tagValue = "[" + listJoiner + "]"; } case TAG_COMPOUND -> tagValue = compoundMapToString(tag.getName(), (CompoundMap) tag.getValue()); default -> { diff --git a/api/src/main/java/net/momirealms/customcrops/api/core/world/CustomCropsWorldImpl.java b/api/src/main/java/net/momirealms/customcrops/api/core/world/CustomCropsWorldImpl.java index cd92342..831144c 100644 --- a/api/src/main/java/net/momirealms/customcrops/api/core/world/CustomCropsWorldImpl.java +++ b/api/src/main/java/net/momirealms/customcrops/api/core/world/CustomCropsWorldImpl.java @@ -203,7 +203,9 @@ public class CustomCropsWorldImpl implements CustomCropsWorld { saveLazyChunks(); saveLazyRegions(); if (isANewDay()) { - updateSeasonAndDate(); + if (setting().autoSeasonChange()) { + updateSeasonAndDate(); + } } if (setting().enableScheduler()) { tickChunks(); diff --git a/api/src/main/java/net/momirealms/customcrops/api/core/world/WorldManager.java b/api/src/main/java/net/momirealms/customcrops/api/core/world/WorldManager.java index 6dcaef6..17b9a33 100644 --- a/api/src/main/java/net/momirealms/customcrops/api/core/world/WorldManager.java +++ b/api/src/main/java/net/momirealms/customcrops/api/core/world/WorldManager.java @@ -18,6 +18,7 @@ package net.momirealms.customcrops.api.core.world; import net.momirealms.customcrops.api.core.world.adaptor.WorldAdaptor; +import net.momirealms.customcrops.api.integration.SeasonProvider; import net.momirealms.customcrops.common.plugin.feature.Reloadable; import org.bukkit.World; @@ -26,6 +27,8 @@ import java.util.Set; public interface WorldManager extends Reloadable { + SeasonProvider seasonProvider(); + Season getSeason(World world); int getDate(World world); diff --git a/common/src/main/java/net/momirealms/customcrops/common/locale/MessageConstants.java b/common/src/main/java/net/momirealms/customcrops/common/locale/MessageConstants.java index 7305293..4fec42c 100644 --- a/common/src/main/java/net/momirealms/customcrops/common/locale/MessageConstants.java +++ b/common/src/main/java/net/momirealms/customcrops/common/locale/MessageConstants.java @@ -28,5 +28,19 @@ public interface MessageConstants { TranslatableComponent.Builder SEASON_AUTUMN = Component.translatable().key("season.autumn"); TranslatableComponent.Builder SEASON_WINTER = Component.translatable().key("season.winter"); TranslatableComponent.Builder SEASON_DISABLE = Component.translatable().key("season.disable"); - + TranslatableComponent.Builder COMMAND_GET_SEASON_SUCCESS = Component.translatable().key("command.season.get.success"); + TranslatableComponent.Builder COMMAND_GET_SEASON_FAILURE = Component.translatable().key("command.season.get.failure"); + TranslatableComponent.Builder COMMAND_SET_SEASON_SUCCESS = Component.translatable().key("command.season.set.success"); + TranslatableComponent.Builder COMMAND_SET_SEASON_FAILURE_DISABLE = Component.translatable().key("command.season.set.failure.disable"); + TranslatableComponent.Builder COMMAND_SET_SEASON_FAILURE_REFERENCE = Component.translatable().key("command.season.set.failure.reference"); + TranslatableComponent.Builder COMMAND_SET_SEASON_FAILURE_OTHER = Component.translatable().key("command.season.set.failure.other"); + TranslatableComponent.Builder COMMAND_SET_SEASON_FAILURE_INVALID = Component.translatable().key("command.season.set.failure.invalid"); + TranslatableComponent.Builder COMMAND_GET_DATE_SUCCESS = Component.translatable().key("command.date.get.success"); + TranslatableComponent.Builder COMMAND_GET_DATE_FAILURE_DISABLE = Component.translatable().key("command.date.get.failure.disable"); + TranslatableComponent.Builder COMMAND_GET_DATE_FAILURE_OTHER = Component.translatable().key("command.date.get.failure.other"); + TranslatableComponent.Builder COMMAND_SET_DATE_SUCCESS = Component.translatable().key("command.date.set.success"); + TranslatableComponent.Builder COMMAND_SET_DATE_FAILURE_DISABLE = Component.translatable().key("command.date.set.failure.disable"); + TranslatableComponent.Builder COMMAND_SET_DATE_FAILURE_REFERENCE = Component.translatable().key("command.date.set.failure.reference"); + TranslatableComponent.Builder COMMAND_SET_DATE_FAILURE_OTHER = Component.translatable().key("command.date.set.failure.other"); + TranslatableComponent.Builder COMMAND_SET_DATE_FAILURE_INVALID = Component.translatable().key("command.date.set.failure.invalid"); } diff --git a/plugin/src/main/java/net/momirealms/customcrops/bukkit/command/BukkitCommandManager.java b/plugin/src/main/java/net/momirealms/customcrops/bukkit/command/BukkitCommandManager.java index beed78b..c7ee24e 100644 --- a/plugin/src/main/java/net/momirealms/customcrops/bukkit/command/BukkitCommandManager.java +++ b/plugin/src/main/java/net/momirealms/customcrops/bukkit/command/BukkitCommandManager.java @@ -19,8 +19,7 @@ package net.momirealms.customcrops.bukkit.command; import net.kyori.adventure.util.Index; import net.momirealms.customcrops.api.BukkitCustomCropsPlugin; -import net.momirealms.customcrops.bukkit.command.feature.DebugDataCommand; -import net.momirealms.customcrops.bukkit.command.feature.ReloadCommand; +import net.momirealms.customcrops.bukkit.command.feature.*; import net.momirealms.customcrops.common.command.AbstractCommandManager; import net.momirealms.customcrops.common.command.CommandFeature; import net.momirealms.customcrops.common.sender.Sender; @@ -37,7 +36,11 @@ public class BukkitCommandManager extends AbstractCommandManager private final List> FEATURES = List.of( new ReloadCommand(this), - new DebugDataCommand(this) + new DebugDataCommand(this), + new GetSeasonCommand(this), + new SetSeasonCommand(this), + new GetDateCommand(this), + new SetDateCommand(this) ); private final Index> INDEX = Index.create(CommandFeature::getFeatureID, FEATURES); diff --git a/plugin/src/main/java/net/momirealms/customcrops/bukkit/command/feature/GetDateCommand.java b/plugin/src/main/java/net/momirealms/customcrops/bukkit/command/feature/GetDateCommand.java new file mode 100644 index 0000000..f156d02 --- /dev/null +++ b/plugin/src/main/java/net/momirealms/customcrops/bukkit/command/feature/GetDateCommand.java @@ -0,0 +1,63 @@ +/* + * Copyright (C) <2024> + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package net.momirealms.customcrops.bukkit.command.feature; + +import net.kyori.adventure.text.Component; +import net.momirealms.customcrops.api.BukkitCustomCropsPlugin; +import net.momirealms.customcrops.api.core.world.Season; +import net.momirealms.customcrops.api.integration.SeasonProvider; +import net.momirealms.customcrops.bukkit.command.BukkitCommandFeature; +import net.momirealms.customcrops.common.command.CustomCropsCommandManager; +import net.momirealms.customcrops.common.locale.MessageConstants; +import org.bukkit.World; +import org.bukkit.command.CommandSender; +import org.incendo.cloud.Command; +import org.incendo.cloud.CommandManager; +import org.incendo.cloud.bukkit.parser.WorldParser; + +public class GetDateCommand extends BukkitCommandFeature { + + public GetDateCommand(CustomCropsCommandManager commandManager) { + super(commandManager); + } + + @Override + public Command.Builder assembleCommand(CommandManager manager, Command.Builder builder) { + return builder + .required("world", WorldParser.worldParser()) + .handler(context -> { + World world = context.get("world"); + SeasonProvider provider = BukkitCustomCropsPlugin.getInstance().getWorldManager().seasonProvider(); + if (provider.identifier().equals("CustomCrops")) { + int date = BukkitCustomCropsPlugin.getInstance().getWorldManager().getDate(world); + if (date != -1) { + handleFeedback(context, MessageConstants.COMMAND_GET_DATE_SUCCESS, Component.text(world.getName()), Component.text(date)); + } else { + handleFeedback(context, MessageConstants.COMMAND_GET_DATE_FAILURE_DISABLE, Component.text(world.getName())); + } + } else { + handleFeedback(context, MessageConstants.COMMAND_GET_DATE_FAILURE_OTHER, Component.text(world.getName()), Component.text(provider.identifier())); + } + }); + } + + @Override + public String getFeatureID() { + return "get_date"; + } +} diff --git a/plugin/src/main/java/net/momirealms/customcrops/bukkit/command/feature/GetSeasonCommand.java b/plugin/src/main/java/net/momirealms/customcrops/bukkit/command/feature/GetSeasonCommand.java new file mode 100644 index 0000000..ff71e8f --- /dev/null +++ b/plugin/src/main/java/net/momirealms/customcrops/bukkit/command/feature/GetSeasonCommand.java @@ -0,0 +1,57 @@ +/* + * Copyright (C) <2024> + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package net.momirealms.customcrops.bukkit.command.feature; + +import net.kyori.adventure.text.Component; +import net.momirealms.customcrops.api.BukkitCustomCropsPlugin; +import net.momirealms.customcrops.api.core.world.Season; +import net.momirealms.customcrops.bukkit.command.BukkitCommandFeature; +import net.momirealms.customcrops.common.command.CustomCropsCommandManager; +import net.momirealms.customcrops.common.locale.MessageConstants; +import org.bukkit.World; +import org.bukkit.command.CommandSender; +import org.incendo.cloud.Command; +import org.incendo.cloud.CommandManager; +import org.incendo.cloud.bukkit.parser.WorldParser; + +public class GetSeasonCommand extends BukkitCommandFeature { + + public GetSeasonCommand(CustomCropsCommandManager commandManager) { + super(commandManager); + } + + @Override + public Command.Builder assembleCommand(CommandManager manager, Command.Builder builder) { + return builder + .required("world", WorldParser.worldParser()) + .handler(context -> { + World world = context.get("world"); + Season season = BukkitCustomCropsPlugin.getInstance().getWorldManager().getSeason(world); + if (season != Season.DISABLE) { + handleFeedback(context, MessageConstants.COMMAND_GET_SEASON_SUCCESS, Component.text(world.getName()), Component.text(season.translation())); + } else { + handleFeedback(context, MessageConstants.COMMAND_GET_SEASON_FAILURE, Component.text(world.getName())); + } + }); + } + + @Override + public String getFeatureID() { + return "get_season"; + } +} diff --git a/plugin/src/main/java/net/momirealms/customcrops/bukkit/command/feature/SetDateCommand.java b/plugin/src/main/java/net/momirealms/customcrops/bukkit/command/feature/SetDateCommand.java new file mode 100644 index 0000000..2acfa10 --- /dev/null +++ b/plugin/src/main/java/net/momirealms/customcrops/bukkit/command/feature/SetDateCommand.java @@ -0,0 +1,93 @@ +/* + * Copyright (C) <2024> + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package net.momirealms.customcrops.bukkit.command.feature; + +import net.kyori.adventure.text.Component; +import net.momirealms.customcrops.api.BukkitCustomCropsPlugin; +import net.momirealms.customcrops.api.core.ConfigManager; +import net.momirealms.customcrops.api.core.world.CustomCropsWorld; +import net.momirealms.customcrops.api.core.world.Season; +import net.momirealms.customcrops.api.integration.SeasonProvider; +import net.momirealms.customcrops.bukkit.command.BukkitCommandFeature; +import net.momirealms.customcrops.common.command.CustomCropsCommandManager; +import net.momirealms.customcrops.common.locale.MessageConstants; +import org.bukkit.World; +import org.bukkit.command.CommandSender; +import org.incendo.cloud.Command; +import org.incendo.cloud.CommandManager; +import org.incendo.cloud.bukkit.parser.WorldParser; +import org.incendo.cloud.parser.standard.IntegerParser; +import org.incendo.cloud.parser.standard.StringParser; +import org.incendo.cloud.suggestion.Suggestion; +import org.incendo.cloud.suggestion.SuggestionProvider; + +import java.util.Locale; +import java.util.Optional; + +public class SetDateCommand extends BukkitCommandFeature { + + public SetDateCommand(CustomCropsCommandManager commandManager) { + super(commandManager); + } + + @Override + public Command.Builder assembleCommand(CommandManager manager, Command.Builder builder) { + return builder + .required("world", WorldParser.worldParser()) + .required("date", IntegerParser.integerParser()) + .handler(context -> { + World world = context.get("world"); + SeasonProvider provider = BukkitCustomCropsPlugin.getInstance().getWorldManager().seasonProvider(); + if (provider.identifier().equals("CustomCrops")) { + Optional> optionalWorld = BukkitCustomCropsPlugin.getInstance().getWorldManager().getWorld(world); + if (optionalWorld.isPresent()) { + CustomCropsWorld customCropsWorld = optionalWorld.get(); + int date = context.get("date"); + if (date < 1 || date > customCropsWorld.setting().seasonDuration()) { + handleFeedback(context, MessageConstants.COMMAND_SET_DATE_FAILURE_INVALID, Component.text(world.getName()), Component.text(date)); + return; + } + if (customCropsWorld.setting().enableSeason()) { + if (ConfigManager.syncSeasons()) { + if (ConfigManager.referenceWorld().equals(world.getName())) { + customCropsWorld.extraData().setDate(date); + handleFeedback(context, MessageConstants.COMMAND_SET_DATE_SUCCESS, Component.text(world.getName()), Component.text(date)); + } else { + handleFeedback(context, MessageConstants.COMMAND_SET_DATE_FAILURE_REFERENCE, Component.text(world.getName())); + } + } else { + customCropsWorld.extraData().setDate(date); + handleFeedback(context, MessageConstants.COMMAND_SET_DATE_SUCCESS, Component.text(world.getName()), Component.text(date)); + } + } else { + handleFeedback(context, MessageConstants.COMMAND_SET_DATE_FAILURE_DISABLE, Component.text(world.getName())); + } + } else { + handleFeedback(context, MessageConstants.COMMAND_SET_DATE_FAILURE_DISABLE, Component.text(world.getName())); + } + } else { + handleFeedback(context, MessageConstants.COMMAND_SET_DATE_FAILURE_OTHER, Component.text(world.getName()), Component.text(provider.identifier())); + } + }); + } + + @Override + public String getFeatureID() { + return "set_date"; + } +} diff --git a/plugin/src/main/java/net/momirealms/customcrops/bukkit/command/feature/SetSeasonCommand.java b/plugin/src/main/java/net/momirealms/customcrops/bukkit/command/feature/SetSeasonCommand.java new file mode 100644 index 0000000..c5bf431 --- /dev/null +++ b/plugin/src/main/java/net/momirealms/customcrops/bukkit/command/feature/SetSeasonCommand.java @@ -0,0 +1,105 @@ +/* + * Copyright (C) <2024> + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package net.momirealms.customcrops.bukkit.command.feature; + +import net.kyori.adventure.text.Component; +import net.momirealms.customcrops.api.BukkitCustomCropsPlugin; +import net.momirealms.customcrops.api.core.ConfigManager; +import net.momirealms.customcrops.api.core.world.CustomCropsWorld; +import net.momirealms.customcrops.api.core.world.Season; +import net.momirealms.customcrops.api.integration.SeasonProvider; +import net.momirealms.customcrops.bukkit.command.BukkitCommandFeature; +import net.momirealms.customcrops.common.command.CustomCropsCommandManager; +import net.momirealms.customcrops.common.locale.MessageConstants; +import org.bukkit.World; +import org.bukkit.command.CommandSender; +import org.checkerframework.checker.nullness.qual.NonNull; +import org.incendo.cloud.Command; +import org.incendo.cloud.CommandManager; +import org.incendo.cloud.bukkit.parser.WorldParser; +import org.incendo.cloud.context.CommandContext; +import org.incendo.cloud.context.CommandInput; +import org.incendo.cloud.parser.standard.StringParser; +import org.incendo.cloud.suggestion.Suggestion; +import org.incendo.cloud.suggestion.SuggestionProvider; + +import java.util.Locale; +import java.util.Optional; +import java.util.concurrent.CompletableFuture; + +public class SetSeasonCommand extends BukkitCommandFeature { + + public SetSeasonCommand(CustomCropsCommandManager commandManager) { + super(commandManager); + } + + @Override + public Command.Builder assembleCommand(CommandManager manager, Command.Builder builder) { + return builder + .required("world", WorldParser.worldParser()) + .required("season", StringParser.stringComponent().suggestionProvider(SuggestionProvider.suggesting( + Suggestion.suggestion("spring"), Suggestion.suggestion("summer"),Suggestion.suggestion("autumn"),Suggestion.suggestion("winter") + ))) + .handler(context -> { + World world = context.get("world"); + SeasonProvider provider = BukkitCustomCropsPlugin.getInstance().getWorldManager().seasonProvider(); + + if (provider.identifier().equals("CustomCrops")) { + Optional> optionalWorld = BukkitCustomCropsPlugin.getInstance().getWorldManager().getWorld(world); + if (optionalWorld.isPresent()) { + CustomCropsWorld customCropsWorld = optionalWorld.get(); + String season = context.get("season"); + Season seasonEnum; + try { + seasonEnum = Season.valueOf(season.toUpperCase(Locale.ENGLISH)); + if (seasonEnum == Season.DISABLE) { + throw new IllegalArgumentException("Invalid season: " + season); + } + } catch (IllegalArgumentException e) { + handleFeedback(context, MessageConstants.COMMAND_SET_SEASON_FAILURE_INVALID, Component.text(world.getName()), Component.text(season)); + return; + } + if (customCropsWorld.setting().enableSeason()) { + if (ConfigManager.syncSeasons()) { + if (ConfigManager.referenceWorld().equals(world.getName())) { + customCropsWorld.extraData().setSeason(seasonEnum); + handleFeedback(context, MessageConstants.COMMAND_SET_SEASON_SUCCESS, Component.text(world.getName()), Component.text(seasonEnum.translation())); + } else { + handleFeedback(context, MessageConstants.COMMAND_SET_SEASON_FAILURE_REFERENCE, Component.text(world.getName())); + } + } else { + customCropsWorld.extraData().setSeason(seasonEnum); + handleFeedback(context, MessageConstants.COMMAND_SET_SEASON_SUCCESS, Component.text(world.getName()), Component.text(seasonEnum.translation())); + } + } else { + handleFeedback(context, MessageConstants.COMMAND_SET_SEASON_FAILURE_DISABLE, Component.text(world.getName())); + } + } else { + handleFeedback(context, MessageConstants.COMMAND_SET_SEASON_FAILURE_DISABLE, Component.text(world.getName())); + } + } else { + handleFeedback(context, MessageConstants.COMMAND_SET_SEASON_FAILURE_OTHER, Component.text(world.getName()), Component.text(provider.identifier())); + } + }); + } + + @Override + public String getFeatureID() { + return "set_season"; + } +} diff --git a/plugin/src/main/java/net/momirealms/customcrops/bukkit/world/BukkitWorldManager.java b/plugin/src/main/java/net/momirealms/customcrops/bukkit/world/BukkitWorldManager.java index e4bb997..02a5cbb 100644 --- a/plugin/src/main/java/net/momirealms/customcrops/bukkit/world/BukkitWorldManager.java +++ b/plugin/src/main/java/net/momirealms/customcrops/bukkit/world/BukkitWorldManager.java @@ -66,7 +66,12 @@ public class BukkitWorldManager implements WorldManager, Listener { @NotNull @Override public Season getSeason(@NotNull World world) { - return BukkitWorldManager.this.getWorld(world).map(w -> w.extraData().getSeason()).orElse(Season.DISABLE); + return BukkitWorldManager.this.getWorld(world).map(w -> { + if (!w.setting().enableSeason()) { + return Season.DISABLE; + } + return w.extraData().getSeason(); + }).orElse(Season.DISABLE); } @Override public String identifier() { @@ -79,6 +84,11 @@ public class BukkitWorldManager implements WorldManager, Listener { this.seasonProvider = seasonProvider; } + @Override + public SeasonProvider seasonProvider() { + return seasonProvider; + } + @Override public Season getSeason(World world) { if (ConfigManager.syncSeasons()) { diff --git a/plugin/src/main/resources/commands.yml b/plugin/src/main/resources/commands.yml index 4c1eba9..c5d32aa 100644 --- a/plugin/src/main/resources/commands.yml +++ b/plugin/src/main/resources/commands.yml @@ -30,6 +30,20 @@ set_season: - /customcrops season set - /ccrops season set +get_date: + enable: true + permission: customcrops.command.get_date + usage: + - /customcrops date get + - /ccrops date get + +set_date: + enable: true + permission: customcrops.command.set_date + usage: + - /customcrops date set + - /ccrops date set + debug_data: enable: true permission: customcrops.command.debug diff --git a/plugin/src/main/resources/translations/en.yml b/plugin/src/main/resources/translations/en.yml index 5d09ab1..96d3173 100644 --- a/plugin/src/main/resources/translations/en.yml +++ b/plugin/src/main/resources/translations/en.yml @@ -39,6 +39,21 @@ argument.parse.failure.aggregate.failure: "Invalid component '': Could not resolve or from ''" argument.parse.failure.namedtextcolor: "'' is not a named text color" command.reload.success: "Reloaded. Took ms." +command.season.get.success: "The season in world [] is []" +command.season.get.failure: "Season is disabled in world []" +command.season.set.success: "Successfully set season to in world []" +command.season.set.failure.disable: "Season is disabled in world []" +command.season.set.failure.reference: "World [] is not the reference world" +command.season.set.failure.other: "Can't set season for world [] because plugin [] takes over the season" +command.season.set.failure.invalid: "Invalid season []" +command.date.get.success: "The date in world [] is []" +command.date.get.failure.disable: "Date is disabled in world []" +command.date.get.failure.other: "Can't get date for world [] because plugin [] takes over the calendar" +command.date.set.success: "Successfully set date to in world []" +command.date.set.failure.disable: "Date is disabled in world []" +command.date.set.failure.reference: "World [] is not the reference world" +command.date.set.failure.other: "Can't set date for world [] because plugin [] takes over the calendar" +command.date.set.failure.invalid: "Invalid date []" season.spring: "Spring" season.summer: "Summer" season.autumn: "Autumn" diff --git a/plugin/src/main/resources/translations/zh_cn.yml b/plugin/src/main/resources/translations/zh_cn.yml index acb9446..96e4aa0 100644 --- a/plugin/src/main/resources/translations/zh_cn.yml +++ b/plugin/src/main/resources/translations/zh_cn.yml @@ -38,7 +38,21 @@ argument.parse.failure.aggregate.missing: "缺少组件 ''" argument.parse.failure.aggregate.failure: "无效的组件 '': " argument.parse.failure.either: "无法从 '' 解析 " argument.parse.failure.namedtextcolor: "'' 不是颜色代码" -command.reload.success: "重新加载完成.耗时 毫秒译者:jhqwqmc" +command.reload.success: "重新加载完成. 耗时 毫秒" +command.season.get.success: "世界 [] 的季节是 []" +command.season.get.failure: "季节没有在世界 [] 启用" +command.season.set.success: "成功设置世界 [] 的季节为 []" +command.season.set.failure.disable: "季节没有在世界 [] 启用" +command.season.set.failure.reference: "世界 [] 不是同步季节设置的参考世界" +command.season.set.failure.other: "无法设置世界 [] 的季节,原因是插件 [] 接管了季节" +command.season.set.failure.invalid: "无效的季节 []" +command.date.get.success: "世界 [] 的日期是 []" +command.date.get.failure.disable: "日期没有在世界 [] 启用" +command.date.get.failure.other: "无法获取世界 [] 的日期,原因是插件 [] 接管了日历" +command.date.set.success: "成功设置世界 [] 的日期为 []" +command.date.set.failure.reference: "世界 [] 不是同步季节设置的参考世界" +command.date.set.failure.other: "无法设置世界 [] 的日期,原因是插件 [] 接管了日历" +command.date.set.failure.invalid: "无效的日期 []" season.spring: "春" season.summer: "夏" season.autumn: "秋"