From bea7e823b6a85ea155c99caf711afac23d206baa Mon Sep 17 00:00:00 2001 From: Xiao-MoMi <70987828+Xiao-MoMi@users.noreply.github.com> Date: Tue, 14 Jun 2022 14:51:37 +0800 Subject: [PATCH] 1.4.4 --- .../customcrops/datamanager/BackUp.java | 2 + .../datamanager/ConfigManager.java | 50 ++--- .../customcrops/datamanager/CropManager.java | 13 +- .../customcrops/datamanager/NextSeason.java | 2 +- .../datamanager/SprinklerManager.java | 2 +- .../integrations/ResidenceIntegrations.java | 1 - .../listener/RightClickCustomBlock.java | 178 +++++++++--------- .../customcrops/timer/TimeCheck.java | 27 +-- src/main/resources/config.yml | 12 +- 9 files changed, 142 insertions(+), 145 deletions(-) diff --git a/src/main/java/net/momirealms/customcrops/datamanager/BackUp.java b/src/main/java/net/momirealms/customcrops/datamanager/BackUp.java index e056d87..27a20ba 100644 --- a/src/main/java/net/momirealms/customcrops/datamanager/BackUp.java +++ b/src/main/java/net/momirealms/customcrops/datamanager/BackUp.java @@ -25,11 +25,13 @@ public class BackUp { BackUp.backUp(crop_data,cropBackUp); } catch (IOException e) { e.printStackTrace(); + CustomCrops.instance.getLogger().warning("crop-data.yml备份出错!"); } try { BackUp.backUp(sprinkler_data,sprinklerBackUp); } catch (IOException e) { e.printStackTrace(); + CustomCrops.instance.getLogger().warning("sprinkler-data.yml备份出错!"); } } diff --git a/src/main/java/net/momirealms/customcrops/datamanager/ConfigManager.java b/src/main/java/net/momirealms/customcrops/datamanager/ConfigManager.java index 3ebcf3f..9d49ffe 100644 --- a/src/main/java/net/momirealms/customcrops/datamanager/ConfigManager.java +++ b/src/main/java/net/momirealms/customcrops/datamanager/ConfigManager.java @@ -163,35 +163,39 @@ public class ConfigManager { YamlConfiguration cropConfig = getConfig("crops.yml"); Set keys = cropConfig.getConfigurationSection("crops").getKeys(false); keys.forEach(key -> { - double chance = cropConfig.getDouble("crops."+key+".grow-chance"); - Crop crop = new Crop(key, chance); - if(cropConfig.getConfigurationSection("crops."+key).contains("return")){ - crop.setWillReturn(true); - crop.setReturnStage(cropConfig.getString("crops."+key+".return")); - }else { - crop.setWillReturn(false); - } - if(Config.season){ - if(cropConfig.getConfigurationSection("crops."+key).contains("season")){ - crop.setSeasons(StringUtils.split( cropConfig.getString("crops."+key+".season"), ",")); + if(cropConfig.getConfigurationSection("crops."+key).contains("grow-chance")){ + double chance = cropConfig.getDouble("crops."+key+".grow-chance"); + Crop crop = new Crop(key, chance); + if(cropConfig.getConfigurationSection("crops."+key).contains("return")){ + crop.setWillReturn(true); + crop.setReturnStage(cropConfig.getString("crops."+key+".return")); }else { - MessageManager.consoleMessage("&c[CustomCrops] 错误!在启用季节模式的情况下未设置农作物 &f"+ key +" &c的生长季节!", Bukkit.getConsoleSender()); - return; + crop.setWillReturn(false); } - } - if(cropConfig.getConfigurationSection("crops."+key).contains("gigantic")){ - crop.setWillGiant(true); - crop.setGiant(cropConfig.getString("crops."+key+".gigantic")); - if(cropConfig.getConfigurationSection("crops."+key).contains("gigantic-chance")){ - crop.setGiantChance(cropConfig.getDouble("crops."+key+".gigantic-chance")); + if(Config.season){ + if(cropConfig.getConfigurationSection("crops."+key).contains("season")){ + crop.setSeasons(StringUtils.split( cropConfig.getString("crops."+key+".season"), ",")); + }else { + MessageManager.consoleMessage("&c[CustomCrops] 错误!在启用季节模式的情况下未设置农作物 &f"+ key +" &c的生长季节!", Bukkit.getConsoleSender()); + return; + } + } + if(cropConfig.getConfigurationSection("crops."+key).contains("gigantic")){ + crop.setWillGiant(true); + crop.setGiant(cropConfig.getString("crops."+key+".gigantic")); + if(cropConfig.getConfigurationSection("crops."+key).contains("gigantic-chance")){ + crop.setGiantChance(cropConfig.getDouble("crops."+key+".gigantic-chance")); + }else { + MessageManager.consoleMessage("&c[CustomCrops] 错误!未设置农作物 &f"+ key +" &c的巨大化概率!", Bukkit.getConsoleSender()); + return; + } }else { - MessageManager.consoleMessage("&c[CustomCrops] 错误!未设置农作物 &f"+ key +" &c的巨大化概率!", Bukkit.getConsoleSender()); - return; + crop.setWillGiant(false); } + CONFIG.put(key, crop); }else { - crop.setWillGiant(false); + MessageManager.consoleMessage("&c[CustomCrops] 错误!未设置农作物 &f"+ key +" &c的生长概率!", Bukkit.getConsoleSender()); } - CONFIG.put(key, crop); }); if(keys.size() == CONFIG.size()){ MessageManager.consoleMessage("&#ccfbff-#ef96c5&[CustomCrops] &f成功载入 &a" + CONFIG.size() + " &f种农作物", Bukkit.getConsoleSender()); diff --git a/src/main/java/net/momirealms/customcrops/datamanager/CropManager.java b/src/main/java/net/momirealms/customcrops/datamanager/CropManager.java index afaebd7..a62f266 100644 --- a/src/main/java/net/momirealms/customcrops/datamanager/CropManager.java +++ b/src/main/java/net/momirealms/customcrops/datamanager/CropManager.java @@ -51,7 +51,6 @@ public class CropManager { FileConfiguration data; data = YamlConfiguration.loadConfiguration(file); - //性能更高 Set> en = CROPS.entrySet(); for(Map.Entry entry : en){ Location loc = entry.getKey(); @@ -65,8 +64,6 @@ public class CropManager { CustomCrops.instance.getLogger().warning("农作物数据保存出错"); } } - - /* 生长部分 */ @@ -78,7 +75,6 @@ public class CropManager { File file = new File(CustomCrops.instance.getDataFolder(), "crop-data.yml"); FileConfiguration data = YamlConfiguration.loadConfiguration(file); BukkitScheduler bukkitScheduler = Bukkit.getScheduler(); - Set> en = CROPS.entrySet(); for(Map.Entry entry : en){ Location key = entry.getKey(); @@ -86,7 +82,6 @@ public class CropManager { } long finish1 = System.currentTimeMillis(); MessageManager.consoleMessage("&#ccfbff-#ef96c5&[CustomCrops] &7农作物数据更新耗时&a" + (finish1 - start1) + "&fms",Bukkit.getConsoleSender()); - /* 阶段2:清理数据内无效的农作物并让有效农作物生长 */ @@ -97,10 +92,8 @@ public class CropManager { String[] coordinate = StringUtils.split(key,","); //先判断区块是否加载,未加载则不进行下一步计算 if (world.isChunkLoaded(Integer.parseInt(coordinate[0])/16, Integer.parseInt(coordinate[2])/16)){ - Location sLoc = new Location(world,Double.parseDouble(coordinate[0]),Double.parseDouble(coordinate[1]),Double.parseDouble(coordinate[2])); CustomBlock seedBlock = CustomBlock.byAlreadyPlaced(sLoc.getBlock()); - if(seedBlock == null){ CROPS.remove(sLoc); data.set(worldName+"."+coordinate[0]+","+coordinate[1]+","+coordinate[2], null); @@ -116,22 +109,18 @@ public class CropManager { return; } if(namespacedID.contains("_stage_")){ - Location potLoc = sLoc.clone().subtract(0,1,0); Block potBlock = potLoc.getBlock(); CustomBlock pot = CustomBlock.byAlreadyPlaced(potBlock); - if (pot != null){ String potName = pot.getNamespacedID(); /* 是湿润的种植盆吗 */ if (potName.equalsIgnoreCase(ConfigManager.Config.watered_pot)){ - String[] split = StringUtils.split(namespacedID,":"); String[] cropNameList = StringUtils.split(split[1],"_"); Crop crop = ConfigManager.CONFIG.get(cropNameList[0]); - //季节判断 Label_out: if(ConfigManager.Config.season){ @@ -246,7 +235,7 @@ public class CropManager { data.save(file); }catch (IOException e){ e.printStackTrace(); - CustomCrops.instance.getLogger().warning("农作物缓存清理保存出错!"); + CustomCrops.instance.getLogger().warning("crop-data.yml保存出错!"); } long finish3 = System.currentTimeMillis(); MessageManager.consoleMessage("&#ccfbff-#ef96c5&[CustomCrops] &7农作物数据保存耗时&a" + (finish3 - start3) + "&fms",Bukkit.getConsoleSender()); diff --git a/src/main/java/net/momirealms/customcrops/datamanager/NextSeason.java b/src/main/java/net/momirealms/customcrops/datamanager/NextSeason.java index cd85eb4..b63c72c 100644 --- a/src/main/java/net/momirealms/customcrops/datamanager/NextSeason.java +++ b/src/main/java/net/momirealms/customcrops/datamanager/NextSeason.java @@ -22,7 +22,7 @@ public class NextSeason { ConfigManager.Config.current = nextSeason; CustomCrops.instance.saveConfig(); }else { - CustomCrops.instance.getLogger().warning("季节配置文件出错!"); + CustomCrops.instance.getLogger().warning("季节出错!"); } } } \ No newline at end of file diff --git a/src/main/java/net/momirealms/customcrops/datamanager/SprinklerManager.java b/src/main/java/net/momirealms/customcrops/datamanager/SprinklerManager.java index 7ae49a4..df3b32f 100644 --- a/src/main/java/net/momirealms/customcrops/datamanager/SprinklerManager.java +++ b/src/main/java/net/momirealms/customcrops/datamanager/SprinklerManager.java @@ -129,7 +129,7 @@ public class SprinklerManager { data.save(file); }catch (IOException e){ e.printStackTrace(); - CustomCrops.instance.getLogger().warning("洒水器数据保存出错!"); + CustomCrops.instance.getLogger().warning("sprinkler-data.yml保存出错!"); } long finish3 = System.currentTimeMillis(); MessageManager.consoleMessage("&#ccfbff-#ef96c5&[CustomCrops] &7洒水器数据保存耗时&a" + (finish3-start3) + "&fms",Bukkit.getConsoleSender()); diff --git a/src/main/java/net/momirealms/customcrops/integrations/ResidenceIntegrations.java b/src/main/java/net/momirealms/customcrops/integrations/ResidenceIntegrations.java index 4876585..358ccd6 100644 --- a/src/main/java/net/momirealms/customcrops/integrations/ResidenceIntegrations.java +++ b/src/main/java/net/momirealms/customcrops/integrations/ResidenceIntegrations.java @@ -8,7 +8,6 @@ import org.bukkit.Location; import org.bukkit.entity.Player; public class ResidenceIntegrations { - public static boolean checkResBuild(Location location, Player player){ FlagPermissions.addFlag("build"); ClaimedResidence res = com.bekvon.bukkit.residence.Residence.getInstance().getResidenceManager().getByLoc(location); diff --git a/src/main/java/net/momirealms/customcrops/listener/RightClickCustomBlock.java b/src/main/java/net/momirealms/customcrops/listener/RightClickCustomBlock.java index 54345a1..2d6e49e 100644 --- a/src/main/java/net/momirealms/customcrops/listener/RightClickCustomBlock.java +++ b/src/main/java/net/momirealms/customcrops/listener/RightClickCustomBlock.java @@ -70,115 +70,115 @@ public class RightClickCustomBlock implements Listener { 右键的是特殊作物吗 */ if (namespacedId.contains("stage")) { - //下方方块不是自定义方块则返回 - Player player = event.getPlayer(); - Block blockUnder = clickedBlockLocation.clone().subtract(0,1,0).getBlock(); - CustomBlock cb = CustomBlock.byAlreadyPlaced(blockUnder); - if (cb == null) return; - //检测右键的方块下方是否为干燥的种植盆方块 - if (cb.getNamespacedID().equalsIgnoreCase(ConfigManager.Config.pot)) { - //获取手中的物品 - ItemStack mainHandItem = player.getInventory().getItemInMainHand(); - Location locUnder = clickedBlockLocation.clone().subtract(0,1,0); - //如果手中的是水桶,那么转干为湿 - if (mainHandItem.getType() == Material.WATER_BUCKET) { - //扣除水桶 - if (player.getGameMode() != GameMode.CREATIVE) { - mainHandItem.setAmount(mainHandItem.getAmount() - 1); - player.getInventory().addItem(new ItemStack(Material.BUCKET)); - } - CustomBlock.remove(locUnder); - CustomBlock.place(ConfigManager.Config.watered_pot, locUnder); - } else if (mainHandItem.getType() == Material.WOODEN_SWORD) { - waterPot(mainHandItem, player, locUnder); + //下方方块不是自定义方块则返回 + Player player = event.getPlayer(); + Block blockUnder = clickedBlockLocation.clone().subtract(0,1,0).getBlock(); + CustomBlock cb = CustomBlock.byAlreadyPlaced(blockUnder); + if (cb == null) return; + //检测右键的方块下方是否为干燥的种植盆方块 + if (cb.getNamespacedID().equalsIgnoreCase(ConfigManager.Config.pot)) { + //获取手中的物品 + ItemStack mainHandItem = player.getInventory().getItemInMainHand(); + Location locUnder = clickedBlockLocation.clone().subtract(0,1,0); + //如果手中的是水桶,那么转干为湿 + if (mainHandItem.getType() == Material.WATER_BUCKET) { + //扣除水桶 + if (player.getGameMode() != GameMode.CREATIVE) { + mainHandItem.setAmount(mainHandItem.getAmount() - 1); + player.getInventory().addItem(new ItemStack(Material.BUCKET)); } + CustomBlock.remove(locUnder); + CustomBlock.place(ConfigManager.Config.watered_pot, locUnder); + } else if (mainHandItem.getType() == Material.WOODEN_SWORD) { + waterPot(mainHandItem, player, locUnder); } - //检测右键的方块下方是否为湿润的种植盆方块 - else if(cb.getNamespacedID().equalsIgnoreCase(ConfigManager.Config.watered_pot)){ - //获取手中的物品 - ItemStack mainHandItem = player.getInventory().getItemInMainHand(); - //如果是骨粉 - if (mainHandItem.getType() == Material.BONE_MEAL){ - //植物是否具有stage属性 - if (namespacedId.contains("_stage_")){ - String[] split = StringUtils.split(namespacedId,":"); - String[] cropNameList = StringUtils.split(split[1],"_"); - //下一生长阶段 - int nextStage = Integer.parseInt(cropNameList[2]) + 1; - //植物是否存在下一个stage - if (CustomBlock.getInstance(split[0]+ ":" + cropNameList[0] + "_stage_" + nextStage) != null){ - if(player.getGameMode() != GameMode.CREATIVE){ - mainHandItem.setAmount(mainHandItem.getAmount() - 1); - } - World world = player.getWorld(); - //骨粉的成功率 - if (Math.random() < ConfigManager.Config.bone_chance){ - CustomBlock.remove(clickedBlockLocation); - CustomBlock.place(split[0] + ":" + cropNameList[0] + "_stage_" + nextStage,clickedBlockLocation); - Particle particleSuccess = Particle.valueOf(ConfigManager.Config.success); - world.spawnParticle(particleSuccess, clickedBlockLocation.clone().add(0.5, 0.1,0.5), 1 ,0,0,0,0); - //使用骨粉是否消耗水分 - if(ConfigManager.Config.need_water){ - CustomBlock.remove(clickedBlockLocation.clone().subtract(0,1,0)); - CustomBlock.place(ConfigManager.Config.pot, clickedBlockLocation.clone().subtract(0,1,0)); - } - }else { - Particle particleFailure = Particle.valueOf(ConfigManager.Config.failure); - world.spawnParticle(particleFailure, clickedBlockLocation.clone().add(0.5, 0.1,0.5), 1 ,0,0,0,0); + } + //检测右键的方块下方是否为湿润的种植盆方块 + else if(cb.getNamespacedID().equalsIgnoreCase(ConfigManager.Config.watered_pot)){ + //获取手中的物品 + ItemStack mainHandItem = player.getInventory().getItemInMainHand(); + //如果是骨粉 + if (mainHandItem.getType() == Material.BONE_MEAL){ + //植物是否具有stage属性 + if (namespacedId.contains("_stage_")){ + String[] split = StringUtils.split(namespacedId,":"); + String[] cropNameList = StringUtils.split(split[1],"_"); + //下一生长阶段 + int nextStage = Integer.parseInt(cropNameList[2]) + 1; + //植物是否存在下一个stage + if (CustomBlock.getInstance(split[0]+ ":" + cropNameList[0] + "_stage_" + nextStage) != null){ + if(player.getGameMode() != GameMode.CREATIVE){ + mainHandItem.setAmount(mainHandItem.getAmount() - 1); + } + World world = player.getWorld(); + //骨粉的成功率 + if (Math.random() < ConfigManager.Config.bone_chance){ + CustomBlock.remove(clickedBlockLocation); + CustomBlock.place(split[0] + ":" + cropNameList[0] + "_stage_" + nextStage,clickedBlockLocation); + Particle particleSuccess = Particle.valueOf(ConfigManager.Config.success); + world.spawnParticle(particleSuccess, clickedBlockLocation.clone().add(0.5, 0.1,0.5), 1 ,0,0,0,0); + //使用骨粉是否消耗水分 + if(ConfigManager.Config.need_water){ + CustomBlock.remove(clickedBlockLocation.clone().subtract(0,1,0)); + CustomBlock.place(ConfigManager.Config.pot, clickedBlockLocation.clone().subtract(0,1,0)); } + }else { + Particle particleFailure = Particle.valueOf(ConfigManager.Config.failure); + world.spawnParticle(particleFailure, clickedBlockLocation.clone().add(0.5, 0.1,0.5), 1 ,0,0,0,0); } } } } + } } /* 右键的是种植盆吗 */ else if (event.getBlockFace() == BlockFace.UP){ - //获取手中的物品 - ItemStack item = event.getItem(); - Player player = event.getPlayer(); - //检测右键的方块是否为干燥的种植盆方块 - if (namespacedId.equalsIgnoreCase(ConfigManager.Config.pot)){ - //如果手中的是水桶,那么转干为湿 - if (item.getType() == Material.WATER_BUCKET){ - //扣除水桶 - if(player.getGameMode() != GameMode.CREATIVE){ - item.setAmount(item.getAmount() - 1); - player.getInventory().addItem(new ItemStack(Material.BUCKET)); - } - CustomBlock.remove(clickedBlockLocation); - CustomBlock.place(ConfigManager.Config.watered_pot,clickedBlockLocation); - return; + //获取手中的物品 + ItemStack item = event.getItem(); + Player player = event.getPlayer(); + //检测右键的方块是否为干燥的种植盆方块 + if (namespacedId.equalsIgnoreCase(ConfigManager.Config.pot)){ + //如果手中的是水桶,那么转干为湿 + if (item.getType() == Material.WATER_BUCKET){ + //扣除水桶 + if(player.getGameMode() != GameMode.CREATIVE){ + item.setAmount(item.getAmount() - 1); + player.getInventory().addItem(new ItemStack(Material.BUCKET)); } - CustomStack customStack = CustomStack.byItemStack(item); - if (customStack != null){ - String namespacedID = customStack.getNamespacedID(); - if (namespacedID.endsWith("_seeds")){ - if(tryPlantSeed(clickedBlockLocation, namespacedID, player)){ - if(player.getGameMode() != GameMode.CREATIVE){ - item.setAmount(item.getAmount() -1); - } + CustomBlock.remove(clickedBlockLocation); + CustomBlock.place(ConfigManager.Config.watered_pot,clickedBlockLocation); + return; + } + CustomStack customStack = CustomStack.byItemStack(item); + if (customStack != null){ + String namespacedID = customStack.getNamespacedID(); + if (namespacedID.endsWith("_seeds")){ + if(tryPlantSeed(clickedBlockLocation, namespacedID, player)){ + if(player.getGameMode() != GameMode.CREATIVE){ + item.setAmount(item.getAmount() -1); } - }else { - waterPot(item, player, clickedBlockLocation); } + }else { + waterPot(item, player, clickedBlockLocation); } } - //检测右键的方块是否为湿润的种植盆方块 - else if(namespacedId.equalsIgnoreCase(ConfigManager.Config.watered_pot)){ - CustomStack customStack = CustomStack.byItemStack(item); - if (customStack != null){ - String namespacedID = customStack.getNamespacedID(); - if (namespacedID.endsWith("_seeds")){ - if(tryPlantSeed(clickedBlockLocation, namespacedID, player)){ - if(player.getGameMode() != GameMode.CREATIVE){ - item.setAmount(item.getAmount() -1); - } + } + //检测右键的方块是否为湿润的种植盆方块 + else if(namespacedId.equalsIgnoreCase(ConfigManager.Config.watered_pot)){ + CustomStack customStack = CustomStack.byItemStack(item); + if (customStack != null){ + String namespacedID = customStack.getNamespacedID(); + if (namespacedID.endsWith("_seeds")){ + if(tryPlantSeed(clickedBlockLocation, namespacedID, player)){ + if(player.getGameMode() != GameMode.CREATIVE){ + item.setAmount(item.getAmount() -1); } } } } + } } } } @@ -280,7 +280,6 @@ public class RightClickCustomBlock implements Listener { CustomBlock cb = CustomBlock.byAlreadyPlaced(tempLoc.getBlock()); if(cb != null){ if(cb.getNamespacedID().equalsIgnoreCase(ConfigManager.Config.pot)){ - //同步替换方块 CustomBlock.remove(tempLoc); CustomBlock.place(ConfigManager.Config.watered_pot,tempLoc); } @@ -299,7 +298,6 @@ public class RightClickCustomBlock implements Listener { CustomBlock cb = CustomBlock.byAlreadyPlaced(tempLoc.getBlock()); if(cb != null){ if(cb.getNamespacedID().equalsIgnoreCase(ConfigManager.Config.pot)){ - //同步替换方块 CustomBlock.remove(tempLoc); CustomBlock.place(ConfigManager.Config.watered_pot,tempLoc); } diff --git a/src/main/java/net/momirealms/customcrops/timer/TimeCheck.java b/src/main/java/net/momirealms/customcrops/timer/TimeCheck.java index 9114815..887c8c6 100644 --- a/src/main/java/net/momirealms/customcrops/timer/TimeCheck.java +++ b/src/main/java/net/momirealms/customcrops/timer/TimeCheck.java @@ -3,6 +3,7 @@ package net.momirealms.customcrops.timer; import net.momirealms.customcrops.datamanager.ConfigManager; import net.momirealms.customcrops.CustomCrops; import net.momirealms.customcrops.datamanager.CropManager; +import net.momirealms.customcrops.datamanager.MessageManager; import net.momirealms.customcrops.datamanager.SprinklerManager; import org.bukkit.Bukkit; import org.bukkit.scheduler.BukkitRunnable; @@ -14,17 +15,21 @@ public class TimeCheck extends BukkitRunnable { public void run() { ConfigManager.Config.worlds.forEach(world ->{ BukkitScheduler bukkitScheduler = Bukkit.getScheduler(); - long time = Bukkit.getWorld(world).getTime(); - ConfigManager.Config.cropGrowTimeList.forEach(cropGrowTime -> { - if(time == cropGrowTime){ - bukkitScheduler.runTaskAsynchronously(CustomCrops.instance, () -> CropManager.CropGrow(world)); - } - }); - ConfigManager.Config.sprinklerWorkTimeList.forEach(sprinklerTime -> { - if(time == sprinklerTime){ - bukkitScheduler.runTaskAsynchronously(CustomCrops.instance, () -> SprinklerManager.SprinklerWork(world)); - } - }); + if(Bukkit.getWorld(world) != null){ + long time = Bukkit.getWorld(world).getTime(); + ConfigManager.Config.cropGrowTimeList.forEach(cropGrowTime -> { + if(time == cropGrowTime){ + bukkitScheduler.runTaskAsynchronously(CustomCrops.instance, () -> CropManager.CropGrow(world)); + } + }); + ConfigManager.Config.sprinklerWorkTimeList.forEach(sprinklerTime -> { + if(time == sprinklerTime){ + bukkitScheduler.runTaskAsynchronously(CustomCrops.instance, () -> SprinklerManager.SprinklerWork(world)); + } + }); + }else { + MessageManager.consoleMessage("&c[CustomCrops] 错误! 白名单世界 "+ world +" 不存在!",Bukkit.getConsoleSender()); + } }); } } \ No newline at end of file diff --git a/src/main/resources/config.yml b/src/main/resources/config.yml index e24a797..166484c 100644 --- a/src/main/resources/config.yml +++ b/src/main/resources/config.yml @@ -75,8 +75,8 @@ config: #每个区块最大农作物数量和洒水器数量 #是否启用限制 enable-limit: true - max-crops: 32 - max-sprinklers: 4 + max-crops: 64 + max-sprinklers: 8 #插件兼容 @@ -94,11 +94,11 @@ config: messages: prefix: '&#ccfbff-#ef96c5&[CustomCrops] ' not-a-good-place: '&f这个地方太高/太低了,请换个地方试试吧!' - reload: '&f插件已重载' - force-save: '&f成功强制保存缓存信息' + reload: '&f插件已重载.' + force-save: '&f成功强制保存缓存信息!' no-such-seed: '&f此种子未在配置文件中配置!' wrong-season: '&f这个季节不适合这种农作物生长!' - season-set: '&f成功设置季节为{Season}' + season-set: '&f成功设置季节为{Season}.' nextseason: '&f已切换到下一季节!' season-disabled: '&f季节系统未启用.' force-grow: '&f已强制生长!' @@ -111,4 +111,4 @@ messages: summer: '&f夏' autumn: '&f秋' winter: '&f冬' - noperm: '&f权限不足' + noperm: '&f权限不足.'