diff --git a/src/main/java/net/momirealms/customcrops/ConfigReader.java b/src/main/java/net/momirealms/customcrops/ConfigReader.java index 54b077f..3c8b2b8 100644 --- a/src/main/java/net/momirealms/customcrops/ConfigReader.java +++ b/src/main/java/net/momirealms/customcrops/ConfigReader.java @@ -64,6 +64,7 @@ public class ConfigReader { public static int yMin; public static int yMax; public static int sprinklerRefill; + public static int timeToGrow; public static boolean logTime; public static boolean onlyLoadedGrow; public static boolean quality; @@ -86,10 +87,12 @@ public class ConfigReader { } }); + timeToGrow = config.getInt("config.time-to-grow",60)*20; + //异步读取时间 asyncCheck = config.getBoolean("config.async-time-check",false); logTime = config.getBoolean("config.log-time-consume",false); - onlyLoadedGrow = config.getBoolean("config.only-grow-in-loaded-chunks",true); + onlyLoadedGrow = !config.getBoolean("config.only-grow-in-loaded-chunks",true); //骨粉设置(已废弃) // useBoneMeal = config.getBoolean("config.bone-meal.enable",false); @@ -267,9 +270,9 @@ public class ConfigReader { range = config.getInt("season.greenhouse.range",7); } seasonChange = config.getBoolean("season.auto-season-change.enable",false); + duration = config.getInt("season.auto-season-change.duration",28); if (seasonChange) { AdventureManager.consoleMessage("[CustomCrops] 当前季节变换模式: 自动"); - duration = config.getInt("season.auto-season-change.duration",28); }else { AdventureManager.consoleMessage("[CustomCrops] 当前季节变换模式: 指令"); } @@ -303,6 +306,7 @@ public class ConfigReader { public static String forceSave; public static boolean hasCropInfo; public static boolean hasSprinklerInfo; + public static boolean hasWaterInfo; public static int cropTime; public static int sprinklerTime; public static String cropText; @@ -311,6 +315,10 @@ public class ConfigReader { public static String sprinklerEmpty; public static String sprinklerRight; public static String beforePlant; + public static String waterLeft; + public static String waterFull; + public static String waterEmpty; + public static String waterRight; public static double cropOffset; public static double sprinklerOffset; @@ -340,6 +348,7 @@ public class ConfigReader { forceSave = config.getString("messages.force-save"); beforePlant = config.getString("messages.before-plant"); + hasCropInfo = config.getBoolean("hologram.grow-info.enable"); if (hasCropInfo){ cropTime = config.getInt("hologram.grow-info.duration"); @@ -355,6 +364,13 @@ public class ConfigReader { sprinklerRight = config.getString("hologram.sprinkler-info.right"); sprinklerOffset = config.getDouble("hologram.sprinkler-info.y-offset"); } + hasWaterInfo = config.getBoolean("actionbar.watering-can.enable"); + if (hasWaterInfo){ + waterLeft = config.getString("actionbar.watering-can.left"); + waterFull = config.getString("actionbar.watering-can.full"); + waterEmpty = config.getString("actionbar.watering-can.empty"); + waterRight = config.getString("actionbar.watering-can.right"); + } } } diff --git a/src/main/java/net/momirealms/customcrops/CustomCrops.java b/src/main/java/net/momirealms/customcrops/CustomCrops.java index 155db6c..f911381 100644 --- a/src/main/java/net/momirealms/customcrops/CustomCrops.java +++ b/src/main/java/net/momirealms/customcrops/CustomCrops.java @@ -1,5 +1,6 @@ package net.momirealms.customcrops; +import de.tr7zw.changeme.nbtapi.NBTItem; import net.kyori.adventure.platform.bukkit.BukkitAudiences; import net.momirealms.customcrops.commands.Executor; import net.momirealms.customcrops.commands.Completer; @@ -15,6 +16,8 @@ import net.momirealms.customcrops.utils.BackUp; import net.momirealms.customcrops.utils.HoloUtil; import net.momirealms.customcrops.utils.Placeholders; import org.bukkit.Bukkit; +import org.bukkit.Material; +import org.bukkit.inventory.ItemStack; import org.bukkit.plugin.java.JavaPlugin; import java.util.Objects; @@ -76,6 +79,8 @@ public final class CustomCrops extends JavaPlugin { this.potManager = new PotManager(this); this.potManager.loadData(); + NBTItem nbtItem = new NBTItem(new ItemStack(Material.WHEAT)); + //启动完成 AdventureManager.consoleMessage("[CustomCrops] 插件已加载!作者:小默米 QQ:3266959688"); } @@ -91,6 +96,11 @@ public final class CustomCrops extends JavaPlugin { this.seasonManager.saveData(); } + //备份数据 + AdventureManager.consoleMessage("[CustomCrops] 插件数据自动备份中..."); + BackUp.backUpData(); + AdventureManager.consoleMessage("[CustomCrops] 备份已完成!"); + //清除悬浮展示实体 HoloUtil.cache.keySet().forEach(player -> { HoloUtil.cache.get(player).remove(); @@ -104,11 +114,6 @@ public final class CustomCrops extends JavaPlugin { this.cropTimerAsync.stopTimer(cropTimerAsync.getTaskID()); } - //备份数据 - AdventureManager.consoleMessage("[CustomCrops] 插件数据自动备份中..."); - BackUp.backUpData(); - AdventureManager.consoleMessage("[CustomCrops] 备份已完成!"); - //卸载完成 AdventureManager.consoleMessage("[CustomCrops] 插件已卸载!作者:小默米 QQ:3266959688"); } diff --git a/src/main/java/net/momirealms/customcrops/commands/Executor.java b/src/main/java/net/momirealms/customcrops/commands/Executor.java index 166bf2c..c661940 100644 --- a/src/main/java/net/momirealms/customcrops/commands/Executor.java +++ b/src/main/java/net/momirealms/customcrops/commands/Executor.java @@ -4,6 +4,7 @@ import net.momirealms.customcrops.utils.AdventureManager; import net.momirealms.customcrops.ConfigReader; import net.momirealms.customcrops.CustomCrops; import net.momirealms.customcrops.utils.BackUp; +import org.bukkit.Bukkit; import org.bukkit.command.Command; import org.bukkit.command.CommandExecutor; import org.bukkit.command.CommandSender; @@ -48,7 +49,9 @@ public class Executor implements CommandExecutor { lackArgs(sender); return true; } - plugin.getCropManager().cropGrow(args[1]); + Bukkit.getScheduler().runTaskAsynchronously(CustomCrops.instance, ()-> { + plugin.getCropManager().cropGrow(args[1]); + }); if (sender instanceof Player player){ AdventureManager.playerMessage(player,ConfigReader.Message.prefix + ConfigReader.Message.forceGrow.replace("{world}",args[1])); }else { @@ -61,7 +64,9 @@ public class Executor implements CommandExecutor { lackArgs(sender); return true; } - plugin.getSprinklerManager().sprinklerWork(args[1]); + Bukkit.getScheduler().runTaskAsynchronously(CustomCrops.instance, ()-> { + plugin.getSprinklerManager().sprinklerWork(args[1]); + }); if (sender instanceof Player player){ AdventureManager.playerMessage(player,ConfigReader.Message.prefix + ConfigReader.Message.forceWater.replace("{world}",args[1])); }else { @@ -115,6 +120,9 @@ public class Executor implements CommandExecutor { } return true; } + case "test" -> { + plugin.getCropManager().testData(); + } case "setseason" -> { if (args.length < 3) { lackArgs(sender); diff --git a/src/main/java/net/momirealms/customcrops/datamanager/CropManager.java b/src/main/java/net/momirealms/customcrops/datamanager/CropManager.java index 9d00b9e..5ca8d4d 100644 --- a/src/main/java/net/momirealms/customcrops/datamanager/CropManager.java +++ b/src/main/java/net/momirealms/customcrops/datamanager/CropManager.java @@ -14,10 +14,13 @@ import org.bukkit.Bukkit; import org.bukkit.Location; import org.bukkit.World; import org.bukkit.configuration.file.YamlConfiguration; +import org.bukkit.scheduler.BukkitScheduler; import java.io.File; import java.io.IOException; import java.util.List; +import java.util.Map; +import java.util.Random; import java.util.concurrent.ConcurrentHashMap; public class CropManager { @@ -25,9 +28,11 @@ public class CropManager { private YamlConfiguration data; private final CustomCrops plugin; public static ConcurrentHashMap Cache = new ConcurrentHashMap<>(); + private BukkitScheduler bukkitScheduler; public CropManager(CustomCrops plugin){ this.plugin = plugin; + this.bukkitScheduler = Bukkit.getScheduler(); } //载入数据 @@ -45,6 +50,15 @@ public class CropManager { this.data = YamlConfiguration.loadConfiguration(file); } + public void testData(){ + for (int i = -200; i <= 200; i++){ + for (int j = -200; j <= 200; j++){ + Location location = new Location(Bukkit.getWorld("world"), i, 91,j); + Cache.put(location, "tomato"); + } + } + } + //保存数据 public void saveData() { File file = new File(CustomCrops.instance.getDataFolder(), "data" + File.separator + "crop.yml"); @@ -84,7 +98,6 @@ public class CropManager { Location seedLocation = new Location(world,Double.parseDouble(coordinate[0]),Double.parseDouble(coordinate[1]),Double.parseDouble(coordinate[2])); CustomBlock seedBlock = CustomBlock.byAlreadyPlaced(seedLocation.getBlock()); StringBuilder stringBuilder = new StringBuilder(); - //需要修改 stringBuilder.append(worldName).append(".").append(chunk).append(".").append(key); if(seedBlock == null) { data.set(stringBuilder.toString(), null); @@ -106,16 +119,16 @@ public class CropManager { String potNamespacedID = pot.getNamespacedID(); String[] cropNameList = StringUtils.split(id,"_"); CropInstance cropInstance = ConfigReader.CROPS.get(cropNameList[0]); + int random = new Random().nextInt(ConfigReader.Config.timeToGrow); if (potNamespacedID.equals(ConfigReader.Basic.watered_pot)){ //如果启用季节限制且农作物有季节需求 if (ConfigReader.Season.enable && cropInstance.getSeasons() != null){ if (isWrongSeason(seedLocation, cropInstance.getSeasons(), worldName)){ data.set(stringBuilder.toString(), null); - Bukkit.getScheduler().callSyncMethod(CustomCrops.instance, () -> { + bukkitScheduler.runTaskLater(CustomCrops.instance, () -> { CustomBlock.remove(seedLocation); CustomBlock.place(ConfigReader.Basic.dead, seedLocation); - return null; - }); + }, random); return; } } @@ -128,18 +141,18 @@ public class CropManager { fertilizer.setTimes(times - 1); if (fertilizer instanceof SpeedGrow speedGrow){ if (Math.random() < speedGrow.getChance() && CustomBlock.getInstance(StringUtils.chop(namespacedID) + (nextStage + 1)) != null){ - addStage(potLocation, seedLocation, namespacedID, nextStage + 1); + addStage(potLocation, seedLocation, namespacedID, nextStage + 1, random); }else { - addStage(potLocation, seedLocation, namespacedID, nextStage); + addStage(potLocation, seedLocation, namespacedID, nextStage, random); } }else if(fertilizer instanceof RetainingSoil retainingSoil){ if (Math.random() < retainingSoil.getChance()){ - addStage(seedLocation, namespacedID, nextStage); + addStage(seedLocation, namespacedID, nextStage, random); }else { - addStage(potLocation, seedLocation, namespacedID, nextStage); + addStage(potLocation, seedLocation, namespacedID, nextStage, random); } }else if(fertilizer instanceof QualityCrop){ - addStage(potLocation, seedLocation, namespacedID, nextStage); + addStage(potLocation, seedLocation, namespacedID, nextStage, random); }else { AdventureManager.consoleMessage("[CustomCrops] 发现未知类型肥料,已自动清除错误数据!"); PotManager.Cache.remove(potLocation); @@ -149,11 +162,11 @@ public class CropManager { } } else { - addStage(potLocation, seedLocation, namespacedID, nextStage); + addStage(potLocation, seedLocation, namespacedID, nextStage, random); } } else if(cropInstance.getGiant() != null){ - Bukkit.getScheduler().callSyncMethod(CustomCrops.instance, () ->{ + bukkitScheduler.runTaskLater(CustomCrops.instance, () ->{ CustomBlock.remove(potLocation); CustomBlock.place(ConfigReader.Basic.pot, potLocation); if(cropInstance.getGiantChance() > Math.random()){ @@ -161,25 +174,22 @@ public class CropManager { CustomBlock.remove(seedLocation); CustomBlock.place(cropInstance.getGiant(), seedLocation); } - return null; - }); + }, random); }else { if (cropInstance.getReturnStage() == null && !ConfigReader.Season.enable) data.set(stringBuilder.toString(), null); - Bukkit.getScheduler().callSyncMethod(CustomCrops.instance, () -> { + bukkitScheduler.runTaskLater(CustomCrops.instance, () -> { CustomBlock.remove(potLocation); CustomBlock.place(ConfigReader.Basic.pot, potLocation); - return null; - }); + }, random); } }else if(potNamespacedID.equals(ConfigReader.Basic.pot)){ if(!ConfigReader.Season.enable || cropInstance.getSeasons() == null) return; if(isWrongSeason(seedLocation, cropInstance.getSeasons(), worldName)){ data.set(stringBuilder.toString(), null); - Bukkit.getScheduler().callSyncMethod(CustomCrops.instance, () -> { + bukkitScheduler.runTaskLater(CustomCrops.instance, () -> { CustomBlock.remove(seedLocation); CustomBlock.place(ConfigReader.Basic.dead, seedLocation); - return null; - }); + }, random); } } }); @@ -216,21 +226,19 @@ public class CropManager { return true; } - private void addStage(Location potLocation, Location seedLocation, String namespacedID, int nextStage){ - Bukkit.getScheduler().callSyncMethod(CustomCrops.instance, () ->{ + private void addStage(Location potLocation, Location seedLocation, String namespacedID, int nextStage, int random){ + bukkitScheduler.runTaskLater(CustomCrops.instance, () ->{ CustomBlock.remove(potLocation); CustomBlock.place(ConfigReader.Basic.pot, potLocation); CustomBlock.remove(seedLocation); CustomBlock.place(StringUtils.chop(namespacedID) + nextStage, seedLocation); - return null; - }); + }, random); } - private void addStage(Location seedLocation, String namespacedID, int nextStage){ - Bukkit.getScheduler().callSyncMethod(CustomCrops.instance, () ->{ + private void addStage(Location seedLocation, String namespacedID, int nextStage, int random){ + bukkitScheduler.runTaskLater(CustomCrops.instance, () ->{ CustomBlock.remove(seedLocation); CustomBlock.place(StringUtils.chop(namespacedID) + nextStage, seedLocation); - return null; - }); + }, random); } } \ No newline at end of file diff --git a/src/main/java/net/momirealms/customcrops/integrations/PlotSquared.java b/src/main/java/net/momirealms/customcrops/integrations/PlotSquared.java index daf3976..f0e0156 100644 --- a/src/main/java/net/momirealms/customcrops/integrations/PlotSquared.java +++ b/src/main/java/net/momirealms/customcrops/integrations/PlotSquared.java @@ -4,19 +4,26 @@ import com.plotsquared.core.location.Location; import org.bukkit.entity.Player; public record PlotSquared() implements Integration { + @Override public boolean canBreak(org.bukkit.Location location, Player player) { -// PlotAPI api = new PlotAPI(); -// PlotPlayer plotPlayer = com.plotsquared.core.PlotSquared.platform().playerManager().getPlayerIfExists(player.getUniqueId()); - Location plotLoc = Location.at(location.getWorld().getName(), location.getBlockX(), location.getBlockY(), location.getBlockZ()); - if (plotLoc.isPlotRoad()) return false; - return plotLoc.getPlotArea().getPlot(plotLoc).isAdded(player.getUniqueId()); + return isAllowed(location, player); } @Override public boolean canPlace(org.bukkit.Location location, Player player) { + return isAllowed(location, player); + } + + private boolean isAllowed(org.bukkit.Location location, Player player) { +// PlotAPI api = new PlotAPI(); +// PlotPlayer plotPlayer = com.plotsquared.core.PlotSquared.platform().playerManager().getPlayerIfExists(player.getUniqueId()); Location plotLoc = Location.at(location.getWorld().getName(), location.getBlockX(), location.getBlockY(), location.getBlockZ()); if (plotLoc.isPlotRoad()) return false; - return plotLoc.getPlotArea().getPlot(plotLoc).isAdded(player.getUniqueId()); + if (plotLoc.getPlotArea() != null){ + return plotLoc.getPlotArea().getPlot(plotLoc).isAdded(player.getUniqueId()); + }else { + return true; + } } } diff --git a/src/main/java/net/momirealms/customcrops/listener/InteractEntity.java b/src/main/java/net/momirealms/customcrops/listener/InteractEntity.java index 47614d4..c974d87 100644 --- a/src/main/java/net/momirealms/customcrops/listener/InteractEntity.java +++ b/src/main/java/net/momirealms/customcrops/listener/InteractEntity.java @@ -48,8 +48,8 @@ public class InteractEntity implements Listener { int x = location.getBlockX(); int z = location.getBlockZ(); int maxWater = config.getWater(); - int currentWater = 0; - Location loc = location.subtract(0,1,0).getBlock().getLocation().add(0,1,0); + int currentWater; + Location loc = location.clone().subtract(0,1,0).getBlock().getLocation().add(0,1,0); Sprinkler sprinkler = SprinklerManager.Cache.get(loc); if (itemStack.getType() == Material.WATER_BUCKET){ itemStack.setType(Material.BUCKET); diff --git a/src/main/java/net/momirealms/customcrops/listener/RightClick.java b/src/main/java/net/momirealms/customcrops/listener/RightClick.java index 6005568..d9e504f 100644 --- a/src/main/java/net/momirealms/customcrops/listener/RightClick.java +++ b/src/main/java/net/momirealms/customcrops/listener/RightClick.java @@ -180,6 +180,11 @@ public class RightClick implements Listener { nbtItem.setInteger("WaterAmount", water + 1); player.getWorld().playSound(player.getLocation(), Sound.ITEM_BUCKET_FILL,1,1); itemStack.setItemMeta(nbtItem.getItem().getItemMeta()); + if (ConfigReader.Message.hasWaterInfo){ + String string = ConfigReader.Message.waterLeft + ConfigReader.Message.waterFull.repeat(water + 1) + + ConfigReader.Message.waterEmpty.repeat(wateringCan.getMax() - water - 1) + ConfigReader.Message.waterRight; + AdventureManager.playerActionbar(player, string.replace("{max_water}", String.valueOf(wateringCan.getMax())).replace("{water}", String.valueOf(water + 1))); + } } return; } @@ -197,11 +202,21 @@ public class RightClick implements Listener { itemStack.setItemMeta(nbtItem.getItem().getItemMeta()); player.getWorld().playSound(player.getLocation(), Sound.BLOCK_WATER_AMBIENT,1,1); waterPot(wateringCan.getWidth(), wateringCan.getLength(), block.getLocation(), player.getLocation().getYaw()); + if (ConfigReader.Message.hasWaterInfo){ + String string = ConfigReader.Message.waterLeft + ConfigReader.Message.waterFull.repeat(water - 1) + + ConfigReader.Message.waterEmpty.repeat(wateringCan.getMax() - water + 1) + ConfigReader.Message.waterRight; + AdventureManager.playerActionbar(player, string.replace("{max_water}", String.valueOf(wateringCan.getMax())).replace("{water}", String.valueOf(water -1))); + } }else if (namespacedID.contains("_stage_")){ nbtItem.setInteger("WaterAmount", water - 1); itemStack.setItemMeta(nbtItem.getItem().getItemMeta()); player.getWorld().playSound(player.getLocation(), Sound.BLOCK_WATER_AMBIENT,1,1); waterPot(wateringCan.getWidth(), wateringCan.getLength(), block.getLocation().subtract(0,1,0), player.getLocation().getYaw()); + if (ConfigReader.Message.hasWaterInfo){ + String string = ConfigReader.Message.waterLeft + ConfigReader.Message.waterFull.repeat(water - 1) + + ConfigReader.Message.waterEmpty.repeat(wateringCan.getMax() - water + 1) + ConfigReader.Message.waterRight; + AdventureManager.playerActionbar(player, string.replace("{max_water}", String.valueOf(wateringCan.getMax())).replace("{water}", String.valueOf(water -1))); + } } } return; diff --git a/src/main/java/net/momirealms/customcrops/timer/TimeCheck.java b/src/main/java/net/momirealms/customcrops/timer/TimeCheck.java index c4b4161..3d50107 100644 --- a/src/main/java/net/momirealms/customcrops/timer/TimeCheck.java +++ b/src/main/java/net/momirealms/customcrops/timer/TimeCheck.java @@ -25,8 +25,10 @@ public class TimeCheck extends BukkitRunnable { if(time == cropGrowTime){ Bukkit.getScheduler().runTaskAsynchronously(CustomCrops.instance, () -> { plugin.getCropManager().cropGrow(world.getName()); - plugin.getSprinklerManager().sprinklerWork(world.getName()); }); + Bukkit.getScheduler().runTaskLaterAsynchronously(CustomCrops.instance, ()->{ + plugin.getSprinklerManager().sprinklerWork(world.getName()); + }, ConfigReader.Config.timeToGrow); } }); }); diff --git a/src/main/java/net/momirealms/customcrops/utils/AdventureManager.java b/src/main/java/net/momirealms/customcrops/utils/AdventureManager.java index fa6c11a..00bf2ac 100644 --- a/src/main/java/net/momirealms/customcrops/utils/AdventureManager.java +++ b/src/main/java/net/momirealms/customcrops/utils/AdventureManager.java @@ -33,4 +33,10 @@ public class AdventureManager { Title title = Title.title(mm.deserialize(s1), mm.deserialize(s2), times); au.showTitle(title); } + + public static void playerActionbar(Player player, String s) { + Audience au = CustomCrops.adventure.player(player); + MiniMessage mm = MiniMessage.miniMessage(); + au.sendActionBar(mm.deserialize(s)); + } } diff --git a/src/main/resources/config.yml b/src/main/resources/config.yml index a51ea82..67ee930 100644 --- a/src/main/resources/config.yml +++ b/src/main/resources/config.yml @@ -18,6 +18,11 @@ config: grow-time: - 1000 + #生长的时间(秒) + #农作物将在90秒内随机完成生长以避免在短时间内大量方块替换造成卡顿 + #但也不建议设置过长时间,否则内存无法及时释放,区块会被持续加载 + time-to-grow: 90 + #产物品质 quality: #若不启用则植物成熟阶段会掉落IA配置里的loot diff --git a/src/main/resources/crops.yml b/src/main/resources/crops.yml index f67b24c..879b7e7 100644 --- a/src/main/resources/crops.yml +++ b/src/main/resources/crops.yml @@ -20,8 +20,8 @@ crops: #生长季节 season: - - spring - summer + - autumn requirements: #适宜的生长高度 @@ -44,21 +44,30 @@ crops: 2: customcrops:cabbage_silver_star 3: customcrops:cabbage_golden_star gigantic: customcrops:gigantic_cabbage - gigantic-chance: 0.02 + gigantic-chance: 0.01 requirements: season: - spring - - summer grape: amount: 2~4 - #空手收获后返回第几个生长状态 quality: 1: customcrops:grape 2: customcrops:grape_silver_star 3: customcrops:grape_golden_star + #空手收获后返回第几个生长状态 return: customcrops:grape_stage_4 requirements: season: - - spring + - autumn + + corn: + amount: 1~2 + quality: + 1: customcrops:corn + 2: customcrops:corn_silver_star + 3: customcrops:corn_golden_star + requirements: + season: + - autumn - summer \ No newline at end of file diff --git a/src/main/resources/messages.yml b/src/main/resources/messages.yml index 102572e..7254dd9 100644 --- a/src/main/resources/messages.yml +++ b/src/main/resources/messages.yml @@ -5,25 +5,25 @@ messages: reload: '重载成功! 耗时 {time}ms' no-perm: '权限不足!' lack-args: '参数不足!' - wrong-args: '参数错误!' + wrong-args: '参数错误!' spring: '春' summer: '夏' autumn: '秋' winter: '冬' - sprinkler-limit: '此区块的洒水器已到达上限{max}' - crop-limit: '此区块的农作物数量已到达上限{max}' - not-configed: '此种子未在配置文件中配置!' - bad-Y: '此高度不适合这种农作物生长!' - bad-biome: '此生物群系不适合这种农作物生长!' - bad-perm: '你还没有权限种植这种农作物呢!' - bad-world: '这个农作物无法在这个世界生长!' - bad-season: '当前季节不适合这种农作物生长!' - force-grow: '成功强制 {world} 的农作物生长!' - force-water: '成功强制 {world} 的洒水器洒水!' - force-save: '成功强制保存缓存信息!' - back-up: '已完成数据备份!' - set-season: '成功切换世界 {world} 的季节为 {season}!' - before-plant: '这种肥料必须在种植前使用!' + sprinkler-limit: '此区块的洒水器已到达上限{max}' + crop-limit: '此区块的农作物数量已到达上限{max}' + not-configed: '此种子未在配置文件中配置!' + bad-Y: '此高度不适合这种农作物生长!' + bad-biome: '此生物群系不适合这种农作物生长!' + bad-perm: '你还没有权限种植这种农作物呢!' + bad-world: '这个农作物无法在这个世界生长!' + bad-season: '当前季节不适合这种农作物生长!' + force-grow: '成功强制 {world} 的农作物生长!' + force-water: '成功强制 {world} 的洒水器洒水!' + force-save: '成功强制保存缓存信息!' + back-up: '已完成数据备份!' + set-season: '成功切换世界 {world} 的季节为 {season}!' + before-plant: '这种肥料必须在种植前使用!' #全息信息显示 hologram: @@ -40,10 +40,20 @@ hologram: #洒水器信息 sprinkler-info: enable: true - y-offset: 0.8 + y-offset: -0.2 duration: 1 #可用变量 {water}当前水量 {max_water}最大蓄水量 left: '뀂' full: '뀁뀃' empty: '뀁뀄' + right: '뀁뀅' + +actionbar: + #使用水壶的时候是否发送actionbar + watering-can: + enable: true + #可用变量 {water}当前水量 {max_water}最大蓄水量 + left: '뀂' + full: '뀁뀃' + empty: '뀁뀄' right: '뀁뀅' \ No newline at end of file