mirror of
https://github.com/Xiao-MoMi/Custom-Crops.git
synced 2025-12-22 16:39:36 +00:00
1.5.12 lang system
This commit is contained in:
@@ -2,8 +2,10 @@
|
|||||||
StardewValley Like Farming System
|
StardewValley Like Farming System
|
||||||
|
|
||||||
### How to buy
|
### How to buy
|
||||||
Unfortunately I only accept Chinese Payments.\
|
|
||||||
https://afdian.net/@xiaomomi
|
https://afdian.net/@xiaomomi\
|
||||||
|
|
||||||
|
https://polymart.org/resource/customcrops.2625
|
||||||
|
|
||||||
### How to compile
|
### How to compile
|
||||||
Just compile it with -gradle shadowjar. Some premium plugins are used as
|
Just compile it with -gradle shadowjar. Some premium plugins are used as
|
||||||
|
|||||||
@@ -69,6 +69,7 @@ public class ConfigReader {
|
|||||||
public static List<Long> cropGrowTimeList;
|
public static List<Long> cropGrowTimeList;
|
||||||
public static List<Integration> integration;
|
public static List<Integration> integration;
|
||||||
public static String referenceWorld;
|
public static String referenceWorld;
|
||||||
|
public static String lang;
|
||||||
public static boolean asyncCheck;
|
public static boolean asyncCheck;
|
||||||
public static boolean enableLimit;
|
public static boolean enableLimit;
|
||||||
public static boolean hasParticle;
|
public static boolean hasParticle;
|
||||||
@@ -95,11 +96,13 @@ public class ConfigReader {
|
|||||||
CustomCrops.instance.reloadConfig();
|
CustomCrops.instance.reloadConfig();
|
||||||
FileConfiguration config = CustomCrops.instance.getConfig();
|
FileConfiguration config = CustomCrops.instance.getConfig();
|
||||||
|
|
||||||
|
lang = config.getString("config.lang","chinese");
|
||||||
|
|
||||||
//农作物生长时间点
|
//农作物生长时间点
|
||||||
cropGrowTimeList = config.getLongList("config.grow-time");
|
cropGrowTimeList = config.getLongList("config.grow-time");
|
||||||
cropGrowTimeList.forEach(time -> {
|
cropGrowTimeList.forEach(time -> {
|
||||||
if(time < 0 || time > 23999){
|
if(time < 0 || time > 23999){
|
||||||
AdventureManager.consoleMessage("<red>[CustomCrops] 农作物生长时间点必须位于0-23999之间");
|
AdventureManager.consoleMessage("<red>[CustomCrops] time should be between 0 and 23999");
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -147,7 +150,7 @@ public class ConfigReader {
|
|||||||
if (allWorld){
|
if (allWorld){
|
||||||
if (config.getStringList("config.whitelist-worlds").size() > 1){
|
if (config.getStringList("config.whitelist-worlds").size() > 1){
|
||||||
referenceWorld = config.getStringList("config.whitelist-worlds").get(0);
|
referenceWorld = config.getStringList("config.whitelist-worlds").get(0);
|
||||||
AdventureManager.consoleMessage("<red>[CustomCrops] 全世界生长模式下只能填写一个白名单世界!");
|
AdventureManager.consoleMessage("<red>[CustomCrops] Only one whitelist world is allowed when \"all-world-grow\" enabled!");
|
||||||
}else {
|
}else {
|
||||||
referenceWorld = config.getStringList("config.whitelist-worlds").get(0);
|
referenceWorld = config.getStringList("config.whitelist-worlds").get(0);
|
||||||
}
|
}
|
||||||
@@ -159,7 +162,7 @@ public class ConfigReader {
|
|||||||
worldNames.forEach(worldName -> {
|
worldNames.forEach(worldName -> {
|
||||||
World world = Bukkit.getWorld(worldName);
|
World world = Bukkit.getWorld(worldName);
|
||||||
if (world == null){
|
if (world == null){
|
||||||
AdventureManager.consoleMessage("<red>[CustomCrops] 世界" + worldName + "" + "不存在");
|
AdventureManager.consoleMessage("<red>[CustomCrops] World " + worldName + " doesn't exist");
|
||||||
}else {
|
}else {
|
||||||
worlds.add(world);
|
worlds.add(world);
|
||||||
}
|
}
|
||||||
@@ -168,58 +171,58 @@ public class ConfigReader {
|
|||||||
integration = new ArrayList<>();
|
integration = new ArrayList<>();
|
||||||
if(config.getBoolean("config.integration.Residence",false)){
|
if(config.getBoolean("config.integration.Residence",false)){
|
||||||
if(Bukkit.getPluginManager().getPlugin("Residence") == null){
|
if(Bukkit.getPluginManager().getPlugin("Residence") == null){
|
||||||
CustomCrops.instance.getLogger().warning("未检测到插件 Residence!");
|
CustomCrops.instance.getLogger().warning("Failed to initialize Residence!");
|
||||||
}else {
|
}else {
|
||||||
integration.add(new Residence());
|
integration.add(new Residence());
|
||||||
AdventureManager.consoleMessage("<gradient:#ff206c:#fdee55>[CustomCrops] </gradient><color:#FFEBCD>已启用 <gold>Residence <color:#FFEBCD>保护!");
|
AdventureManager.consoleMessage("<gradient:#ff206c:#fdee55>[CustomCrops] </gradient><gold>Residence <color:#FFEBCD>Hooked!");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if(config.getBoolean("config.integration.Kingdoms",false)){
|
if(config.getBoolean("config.integration.Kingdoms",false)){
|
||||||
if(Bukkit.getPluginManager().getPlugin("Kingdoms") == null){
|
if(Bukkit.getPluginManager().getPlugin("Kingdoms") == null){
|
||||||
CustomCrops.instance.getLogger().warning("未检测到插件 Kingdoms!");
|
CustomCrops.instance.getLogger().warning("Failed to initialize Kingdoms!");
|
||||||
}else {
|
}else {
|
||||||
integration.add(new KingdomsX());
|
integration.add(new KingdomsX());
|
||||||
AdventureManager.consoleMessage("<gradient:#ff206c:#fdee55>[CustomCrops] </gradient><color:#FFEBCD>已启用 <gold>KingdomsX <color:#FFEBCD>保护!");
|
AdventureManager.consoleMessage("<gradient:#ff206c:#fdee55>[CustomCrops] </gradient><gold>KingdomsX <color:#FFEBCD>Hooked!");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if(config.getBoolean("config.integration.WorldGuard",false)){
|
if(config.getBoolean("config.integration.WorldGuard",false)){
|
||||||
if(Bukkit.getPluginManager().getPlugin("WorldGuard") == null){
|
if(Bukkit.getPluginManager().getPlugin("WorldGuard") == null){
|
||||||
CustomCrops.instance.getLogger().warning("未检测到插件 WorldGuard!");
|
CustomCrops.instance.getLogger().warning("Failed to initialize WorldGuard!");
|
||||||
}else {
|
}else {
|
||||||
integration.add(new WorldGuard());
|
integration.add(new WorldGuard());
|
||||||
AdventureManager.consoleMessage("<gradient:#ff206c:#fdee55>[CustomCrops] </gradient><color:#FFEBCD>已启用 <gold>WorldGuard <color:#FFEBCD>保护!");
|
AdventureManager.consoleMessage("<gradient:#ff206c:#fdee55>[CustomCrops] </gradient><gold>WorldGuard <color:#FFEBCD>Hooked!");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if(config.getBoolean("config.integration.GriefDefender",false)){
|
if(config.getBoolean("config.integration.GriefDefender",false)){
|
||||||
if(Bukkit.getPluginManager().getPlugin("GriefDefender") == null){
|
if(Bukkit.getPluginManager().getPlugin("GriefDefender") == null){
|
||||||
CustomCrops.instance.getLogger().warning("未检测到插件 GriefDefender!");
|
CustomCrops.instance.getLogger().warning("Failed to initialize GriefDefender!");
|
||||||
}else {
|
}else {
|
||||||
integration.add(new GriefDefender());
|
integration.add(new GriefDefender());
|
||||||
AdventureManager.consoleMessage("<gradient:#ff206c:#fdee55>[CustomCrops] </gradient><color:#FFEBCD>已启用 <gold>GriefDefender <color:#FFEBCD>保护!");
|
AdventureManager.consoleMessage("<gradient:#ff206c:#fdee55>[CustomCrops] </gradient><gold>GriefDefender <color:#FFEBCD>Hooked!");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if(config.getBoolean("config.integration.PlotSquared",false)){
|
if(config.getBoolean("config.integration.PlotSquared",false)){
|
||||||
if(Bukkit.getPluginManager().getPlugin("PlotSquared") == null){
|
if(Bukkit.getPluginManager().getPlugin("PlotSquared") == null){
|
||||||
CustomCrops.instance.getLogger().warning("未检测到插件 PlotSquared!");
|
CustomCrops.instance.getLogger().warning("Failed to initialize PlotSquared!");
|
||||||
}else {
|
}else {
|
||||||
integration.add(new PlotSquared());
|
integration.add(new PlotSquared());
|
||||||
AdventureManager.consoleMessage("<gradient:#ff206c:#fdee55>[CustomCrops] </gradient><color:#FFEBCD>已启用 <gold>PlotSquared <color:#FFEBCD>保护!");
|
AdventureManager.consoleMessage("<gradient:#ff206c:#fdee55>[CustomCrops] </gradient><gold>PlotSquared <color:#FFEBCD>Hooked!");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if(config.getBoolean("config.integration.Towny",false)){
|
if(config.getBoolean("config.integration.Towny",false)){
|
||||||
if(Bukkit.getPluginManager().getPlugin("Towny") == null){
|
if(Bukkit.getPluginManager().getPlugin("Towny") == null){
|
||||||
CustomCrops.instance.getLogger().warning("未检测到插件 Towny!");
|
CustomCrops.instance.getLogger().warning("Failed to initialize Towny!");
|
||||||
}else {
|
}else {
|
||||||
integration.add(new Towny());
|
integration.add(new Towny());
|
||||||
AdventureManager.consoleMessage("<gradient:#ff206c:#fdee55>[CustomCrops] </gradient><color:#FFEBCD>已启用 <gold>Towny <color:#FFEBCD>保护!");
|
AdventureManager.consoleMessage("<gradient:#ff206c:#fdee55>[CustomCrops] </gradient><gold>Towny <color:#FFEBCD>Hooked!");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if(config.getBoolean("config.integration.Lands",false)){
|
if(config.getBoolean("config.integration.Lands",false)){
|
||||||
if(Bukkit.getPluginManager().getPlugin("Lands") == null){
|
if(Bukkit.getPluginManager().getPlugin("Lands") == null){
|
||||||
CustomCrops.instance.getLogger().warning("未检测到插件 Lands!");
|
CustomCrops.instance.getLogger().warning("Failed to initialize Lands!");
|
||||||
}else {
|
}else {
|
||||||
integration.add(new Lands());
|
integration.add(new Lands());
|
||||||
AdventureManager.consoleMessage("<gradient:#ff206c:#fdee55>[CustomCrops] </gradient><color:#FFEBCD>已启用 <gold>Lands <color:#FFEBCD>保护!");
|
AdventureManager.consoleMessage("<gradient:#ff206c:#fdee55>[CustomCrops] </gradient><gold>Lands <color:#FFEBCD>Hooked!");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -262,17 +265,17 @@ public class ConfigReader {
|
|||||||
if (key.equals(StringUtils.split(config.getString("water-can." + key + ".item"),":")[1])){
|
if (key.equals(StringUtils.split(config.getString("water-can." + key + ".item"),":")[1])){
|
||||||
int width = config.getInt("water-can." + key + ".width");
|
int width = config.getInt("water-can." + key + ".width");
|
||||||
if (width % 2 == 0){
|
if (width % 2 == 0){
|
||||||
AdventureManager.consoleMessage("<red>[CustomCrops] 水壶 " + key + " 的浇灌宽度必须为奇数!</red>");
|
AdventureManager.consoleMessage("<red>[CustomCrops] Watering Can " + key + "'s width should be odd!</red>");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
WateringCan wateringCan = new WateringCan(config.getInt("water-can." + key + ".max"), width, config.getInt("water-can." + key + ".length"));
|
WateringCan wateringCan = new WateringCan(config.getInt("water-can." + key + ".max"), width, config.getInt("water-can." + key + ".length"));
|
||||||
CANS.put(key, wateringCan);
|
CANS.put(key, wateringCan);
|
||||||
}else {
|
}else {
|
||||||
AdventureManager.consoleMessage("<red>[CustomCrops] 水壶 " + key + " 与ItemsAdder物品ID不一致</red>");
|
AdventureManager.consoleMessage("<red>[CustomCrops] Watering Can " + key + "'s key should be the same</red>");
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
AdventureManager.consoleMessage("<gradient:#ff206c:#fdee55>[CustomCrops] </gradient><color:#FFEBCD>已载入 <white>" + CANS.size() + " <color:#FFEBCD>个水壶!");
|
AdventureManager.consoleMessage("<gradient:#ff206c:#fdee55>[CustomCrops] </gradient><white>" + CANS.size() + " <color:#FFEBCD>cans loaded!");
|
||||||
|
|
||||||
SPRINKLERS.clear();
|
SPRINKLERS.clear();
|
||||||
if (config.contains("sprinkler")){
|
if (config.contains("sprinkler")){
|
||||||
@@ -285,11 +288,11 @@ public class ConfigReader {
|
|||||||
SPRINKLERS.put(key, sprinklerData);
|
SPRINKLERS.put(key, sprinklerData);
|
||||||
SPRINKLERS.put(StringUtils.split(twoD,":")[1], sprinklerData);
|
SPRINKLERS.put(StringUtils.split(twoD,":")[1], sprinklerData);
|
||||||
}else {
|
}else {
|
||||||
AdventureManager.consoleMessage("<red>[CustomCrops] 洒水器 " + key + " 与ItemsAdder物品ID不一致</red>");
|
AdventureManager.consoleMessage("<red>[CustomCrops] Sprinkler " + key + "'s key should be the same with ItemsAdder 3D sprinkler's key</red>");
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
AdventureManager.consoleMessage("<gradient:#ff206c:#fdee55>[CustomCrops] </gradient><color:#FFEBCD>已载入 <white>" + SPRINKLERS.size()/2 + " <color:#FFEBCD>个洒水器!");
|
AdventureManager.consoleMessage("<gradient:#ff206c:#fdee55>[CustomCrops] </gradient><white>" + SPRINKLERS.size()/2 + "<color:#FFEBCD> srpinklers loaded!");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -313,9 +316,9 @@ public class ConfigReader {
|
|||||||
seasonChange = config.getBoolean("season.auto-season-change.enable",false);
|
seasonChange = config.getBoolean("season.auto-season-change.enable",false);
|
||||||
duration = config.getInt("season.auto-season-change.duration",28);
|
duration = config.getInt("season.auto-season-change.duration",28);
|
||||||
if (seasonChange) {
|
if (seasonChange) {
|
||||||
AdventureManager.consoleMessage("<gradient:#ff206c:#fdee55>[CustomCrops] </gradient><color:#FFEBCD>当前季节变换模式: <gold>自动");
|
AdventureManager.consoleMessage("<gradient:#ff206c:#fdee55>[CustomCrops] </gradient><color:#FFEBCD>Season Change mode: <gold>Auto");
|
||||||
}else {
|
}else {
|
||||||
AdventureManager.consoleMessage("<gradient:#ff206c:#fdee55>[CustomCrops] </gradient><color:#FFEBCD>当前季节变换模式: <gold>指令");
|
AdventureManager.consoleMessage("<gradient:#ff206c:#fdee55>[CustomCrops] </gradient><color:#FFEBCD>Season Change mode: <gold>Command");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -365,7 +368,7 @@ public class ConfigReader {
|
|||||||
public static double sprinklerOffset;
|
public static double sprinklerOffset;
|
||||||
|
|
||||||
public static void loadMessage(){
|
public static void loadMessage(){
|
||||||
YamlConfiguration config = getConfig("messages.yml");
|
YamlConfiguration config = getConfig("messages/messages_" + Config.lang +".yml");
|
||||||
prefix = config.getString("messages.prefix");
|
prefix = config.getString("messages.prefix");
|
||||||
reload = config.getString("messages.reload");
|
reload = config.getString("messages.reload");
|
||||||
lackArgs = config.getString("messages.lack-args");
|
lackArgs = config.getString("messages.lack-args");
|
||||||
@@ -389,7 +392,7 @@ public class ConfigReader {
|
|||||||
wrongArgs = config.getString("messages.wrong-args");
|
wrongArgs = config.getString("messages.wrong-args");
|
||||||
forceSave = config.getString("messages.force-save");
|
forceSave = config.getString("messages.force-save");
|
||||||
beforePlant = config.getString("messages.before-plant");
|
beforePlant = config.getString("messages.before-plant");
|
||||||
noSeason = config.getString("messages.no-season","当前世界没有季节");
|
noSeason = config.getString("messages.no-season","Season Disabled");
|
||||||
|
|
||||||
hasCropInfo = config.getBoolean("hologram.grow-info.enable");
|
hasCropInfo = config.getBoolean("hologram.grow-info.enable");
|
||||||
if (hasCropInfo){
|
if (hasCropInfo){
|
||||||
@@ -426,7 +429,7 @@ public class ConfigReader {
|
|||||||
String[] split = StringUtils.split(config.getString("crops." + key + ".amount"),"~");
|
String[] split = StringUtils.split(config.getString("crops." + key + ".amount"),"~");
|
||||||
cropInstance = new CropInstance(Integer.parseInt(split[0]),Integer.parseInt(split[1]));
|
cropInstance = new CropInstance(Integer.parseInt(split[0]),Integer.parseInt(split[1]));
|
||||||
}else {
|
}else {
|
||||||
AdventureManager.consoleMessage("<red>[CustomCrops] 未设置农作物 " + key +" 的产物数量!</red>");
|
AdventureManager.consoleMessage("<red>[CustomCrops] You forget to set " + key +"'s amount!</red>");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (config.contains("crops." + key + ".gigantic")){
|
if (config.contains("crops." + key + ".gigantic")){
|
||||||
@@ -458,12 +461,50 @@ public class ConfigReader {
|
|||||||
}
|
}
|
||||||
CROPS.put(key, cropInstance);
|
CROPS.put(key, cropInstance);
|
||||||
});
|
});
|
||||||
AdventureManager.consoleMessage("<gradient:#ff206c:#fdee55>[CustomCrops] </gradient><color:#FFEBCD>已载入 <white>" + CROPS.size() + " <color:#FFEBCD>种农作物!");
|
AdventureManager.consoleMessage("<gradient:#ff206c:#fdee55>[CustomCrops] </gradient><white>" + CROPS.size() + " <color:#FFEBCD>crops loaded!");
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void fertilizerLoad(){
|
public static void fertilizerLoad(){
|
||||||
FERTILIZERS.clear();
|
FERTILIZERS.clear();
|
||||||
YamlConfiguration config = getConfig("fertilizer.yml");
|
YamlConfiguration config = getConfig("fertilizer.yml");
|
||||||
|
if (config.contains("speed")){
|
||||||
|
config.getConfigurationSection("speed").getKeys(false).forEach(key -> {
|
||||||
|
if (StringUtils.split(config.getString("speed." + key + ".item"), ":")[1].equals(key)){
|
||||||
|
SpeedGrow speedGrow = new SpeedGrow(key, config.getInt("speed." + key + ".times"), config.getDouble("speed." + key + ".chance"), config.getBoolean("加速肥料." + key + ".before-plant"));
|
||||||
|
speedGrow.setName(config.getString("speed." + key + ".name"));
|
||||||
|
FERTILIZERS.put(key, speedGrow);
|
||||||
|
}else {
|
||||||
|
AdventureManager.consoleMessage("<red>[CustomCrops] fertilizer " + key + "'s key should be the same with ItemsAdder item's key </red>");
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
if (config.contains("retaining")){
|
||||||
|
config.getConfigurationSection("retaining").getKeys(false).forEach(key -> {
|
||||||
|
if (StringUtils.split(config.getString("retaining." + key + ".item"), ":")[1].equals(key)){
|
||||||
|
RetainingSoil retainingSoil = new RetainingSoil(key, config.getInt("retaining." + key + ".times"), config.getDouble("retaining." + key + ".chance"), config.getBoolean("保湿肥料." + key + ".before-plant"));
|
||||||
|
retainingSoil.setName(config.getString("retaining." + key + ".name"));
|
||||||
|
FERTILIZERS.put(key, retainingSoil);
|
||||||
|
}else {
|
||||||
|
AdventureManager.consoleMessage("<red>[CustomCrops] fertilizer " + key + "'s key should be the same with ItemsAdder item's key </red>");
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
if (config.contains("quality")){
|
||||||
|
config.getConfigurationSection("quality").getKeys(false).forEach(key -> {
|
||||||
|
if (StringUtils.split(config.getString("quality." + key + ".item"), ":")[1].equals(key)){
|
||||||
|
String[] split = StringUtils.split(config.getString("quality." + key + ".chance"), "/");
|
||||||
|
int[] weight = new int[3];
|
||||||
|
weight[0] = Integer.parseInt(split[0]);
|
||||||
|
weight[1] = Integer.parseInt(split[1]);
|
||||||
|
weight[2] = Integer.parseInt(split[2]);
|
||||||
|
QualityCrop qualityCrop = new QualityCrop(key, config.getInt("quality." + key + ".times"), weight, config.getBoolean("quality." + key + ".before-plant"));
|
||||||
|
qualityCrop.setName(config.getString("quality." + key + ".name"));
|
||||||
|
FERTILIZERS.put(key, qualityCrop);
|
||||||
|
}else {
|
||||||
|
AdventureManager.consoleMessage("<red>[CustomCrops] fertilizer " + key + "'s key should be the same with ItemsAdder item's key </red>");
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
if (config.contains("加速肥料")){
|
if (config.contains("加速肥料")){
|
||||||
config.getConfigurationSection("加速肥料").getKeys(false).forEach(key -> {
|
config.getConfigurationSection("加速肥料").getKeys(false).forEach(key -> {
|
||||||
if (StringUtils.split(config.getString("加速肥料." + key + ".item"), ":")[1].equals(key)){
|
if (StringUtils.split(config.getString("加速肥料." + key + ".item"), ":")[1].equals(key)){
|
||||||
@@ -502,7 +543,7 @@ public class ConfigReader {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
AdventureManager.consoleMessage("<gradient:#ff206c:#fdee55>[CustomCrops] </gradient><color:#FFEBCD>已载入 <white>" + FERTILIZERS.size() + " <color:#FFEBCD>种肥料!");
|
AdventureManager.consoleMessage("<gradient:#ff206c:#fdee55>[CustomCrops] </gradient><white>" + FERTILIZERS.size() + " <color:#FFEBCD>fertilizers loaded!");
|
||||||
}
|
}
|
||||||
|
|
||||||
public static class Sounds{
|
public static class Sounds{
|
||||||
|
|||||||
@@ -79,7 +79,7 @@ public final class CustomCrops extends JavaPlugin {
|
|||||||
//PAPI
|
//PAPI
|
||||||
if(Bukkit.getPluginManager().getPlugin("PlaceHolderAPI") != null){
|
if(Bukkit.getPluginManager().getPlugin("PlaceHolderAPI") != null){
|
||||||
new Placeholders().register();
|
new Placeholders().register();
|
||||||
AdventureManager.consoleMessage("<gradient:#ff206c:#fdee55>[CustomCrops] </gradient><color:#F5DEB3>检测到 <gold>PlaceHolderAPI <color:#FFEBCD>已启用变量!");
|
AdventureManager.consoleMessage("<gradient:#ff206c:#fdee55>[CustomCrops] </gradient><gold>PlaceHolderAPI <color:#FFEBCD>Hooked!");
|
||||||
}
|
}
|
||||||
|
|
||||||
//指令注册
|
//指令注册
|
||||||
@@ -112,7 +112,7 @@ public final class CustomCrops extends JavaPlugin {
|
|||||||
this.potManager.loadData();
|
this.potManager.loadData();
|
||||||
|
|
||||||
//启动完成
|
//启动完成
|
||||||
AdventureManager.consoleMessage("<gradient:#ff206c:#fdee55>[CustomCrops] </gradient><color:#F5DEB3>插件已加载!作者:小默米 QQ:3266959688");
|
AdventureManager.consoleMessage("<gradient:#ff206c:#fdee55>[CustomCrops] </gradient><color:#F5DEB3>Plugin Enabled!");
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -129,9 +129,9 @@ public final class CustomCrops extends JavaPlugin {
|
|||||||
}
|
}
|
||||||
|
|
||||||
//备份数据
|
//备份数据
|
||||||
getLogger().info("插件数据自动备份中...");
|
getLogger().info("Back Up...");
|
||||||
BackUp.backUpData();
|
BackUp.backUpData();
|
||||||
getLogger().info("备份已完成...");
|
getLogger().info("Done.");
|
||||||
|
|
||||||
//清除悬浮展示实体
|
//清除悬浮展示实体
|
||||||
HoloUtil.cache.keySet().forEach(location -> {
|
HoloUtil.cache.keySet().forEach(location -> {
|
||||||
|
|||||||
@@ -82,7 +82,6 @@ public class PotManager {
|
|||||||
|
|
||||||
public void saveData(){
|
public void saveData(){
|
||||||
File file = new File(CustomCrops.instance.getDataFolder(), "data" + File.separator + "pot.yml");
|
File file = new File(CustomCrops.instance.getDataFolder(), "data" + File.separator + "pot.yml");
|
||||||
System.out.println(Cache.size());
|
|
||||||
YamlConfiguration data = new YamlConfiguration();
|
YamlConfiguration data = new YamlConfiguration();
|
||||||
Cache.forEach(((location, fertilizer) -> {
|
Cache.forEach(((location, fertilizer) -> {
|
||||||
String world = location.getWorldName();
|
String world = location.getWorldName();
|
||||||
|
|||||||
@@ -1,22 +1,17 @@
|
|||||||
#填写IA物品的命名空间与物品ID
|
#ItemsAdder items namespacedID
|
||||||
basic:
|
basic:
|
||||||
#植物的种植盆方块
|
|
||||||
pot: customcrops:pot
|
pot: customcrops:pot
|
||||||
#植物的浇过水的种植盆方块
|
|
||||||
watered-pot: customcrops:watered_pot
|
watered-pot: customcrops:watered_pot
|
||||||
#温室玻璃方块
|
|
||||||
greenhouse-glass: customcrops:greenhouse_glass
|
greenhouse-glass: customcrops:greenhouse_glass
|
||||||
#农作物枯萎后变成的方块,物品ID中请保留stage以保持其下方方块被破坏时,枯萎作物也被破坏的特性
|
|
||||||
dead-crop: customcrops:crop_stage_death
|
dead-crop: customcrops:crop_stage_death
|
||||||
#土质探测器,用于查看使用的肥料种类和残余量
|
|
||||||
soil-detector: customcrops:soil_detector
|
soil-detector: customcrops:soil_detector
|
||||||
|
|
||||||
water-can:
|
water-can:
|
||||||
watering_can_1:
|
watering_can_1:
|
||||||
item: customcrops:watering_can_1
|
item: customcrops:watering_can_1
|
||||||
#水壶最大容量
|
#Max storage
|
||||||
max: 3
|
max: 3
|
||||||
#水壶工作的范围
|
#Effective Range
|
||||||
width: 1
|
width: 1
|
||||||
length: 1
|
length: 1
|
||||||
watering_can_2:
|
watering_can_2:
|
||||||
@@ -36,16 +31,16 @@ water-can:
|
|||||||
length: 5
|
length: 5
|
||||||
|
|
||||||
lore:
|
lore:
|
||||||
#是否修改水壶物品的Lore
|
#Should lore be changed when using watering-can
|
||||||
watering-can:
|
watering-can:
|
||||||
enable: true
|
enable: true
|
||||||
#Lore样式
|
#Lore format
|
||||||
lore:
|
lore:
|
||||||
- '<italic:false><white>{water_info}'
|
- '<italic:false><white>{water_info}'
|
||||||
- '<italic:false><gray>右键水方块为水壶加水'
|
- '<italic:false><gray>Right click water to add water to the can.'
|
||||||
|
|
||||||
#水量 {water_info}
|
#Available variables: {water_info}
|
||||||
#可用变量 {water}当前水量 {max_water}最大蓄水量
|
#{water}current water {max_water}max storage
|
||||||
left: '<font:customcrops:default>뀂'
|
left: '<font:customcrops:default>뀂'
|
||||||
full: '뀁뀃'
|
full: '뀁뀃'
|
||||||
empty: '뀁뀄'
|
empty: '뀁뀄'
|
||||||
@@ -53,9 +48,8 @@ lore:
|
|||||||
|
|
||||||
sprinkler:
|
sprinkler:
|
||||||
sprinkler_1:
|
sprinkler_1:
|
||||||
#洒水器工作范围
|
|
||||||
range: 1
|
range: 1
|
||||||
#洒水器最大水储量
|
#Max storage
|
||||||
max-water: 5
|
max-water: 5
|
||||||
3Ditem: customcrops:sprinkler_1
|
3Ditem: customcrops:sprinkler_1
|
||||||
2Ditem: customcrops:sprinkler_1_item
|
2Ditem: customcrops:sprinkler_1_item
|
||||||
|
|||||||
@@ -1,5 +1,8 @@
|
|||||||
config:
|
config:
|
||||||
#插件兼容
|
#english spanish chinese
|
||||||
|
lang: english
|
||||||
|
|
||||||
|
#integration to prevent other players' grief
|
||||||
integration:
|
integration:
|
||||||
Residence: false
|
Residence: false
|
||||||
WorldGuard: false
|
WorldGuard: false
|
||||||
@@ -9,70 +12,65 @@ config:
|
|||||||
Towny: false
|
Towny: false
|
||||||
Lands: false
|
Lands: false
|
||||||
|
|
||||||
#生长时间点(tick)
|
#The time to start growing(ticks)
|
||||||
#1000代表上午7点,农作物陆续开始生长
|
#1000ticks is 7am in game. (0-23999)
|
||||||
#洒水器将会在农作物全部完成生长后开始工作
|
#Sprinklers will work after all crops finish growing
|
||||||
grow-time:
|
grow-time:
|
||||||
- 1000
|
- 1000
|
||||||
|
|
||||||
#生长点后农作物成长所需的时间(秒)
|
#Time in random a single crop need to grow(seconds)
|
||||||
#农作物将在60秒内随机完成生长以避免在短时间内大量方块替换造成卡顿
|
#This prevents a large amount of crops grow at the same time
|
||||||
#但也不建议设置过长时间,否则内存无法及时释放,区块会被持续加载
|
#Large amount of block replacement would cause lag.
|
||||||
#配合上方的默认时间点,意思为每天上午7点后,农作物将在60秒内完成生长过程
|
|
||||||
time-to-grow: 60
|
time-to-grow: 60
|
||||||
#农作物全部完成生长后洒水器工作所需的时间
|
#Similar to "time-to-grow", this prevent all sprinklers work at the same time
|
||||||
time-to-work: 30
|
time-to-work: 30
|
||||||
|
|
||||||
#产物品质
|
|
||||||
quality:
|
quality:
|
||||||
#若不启用则植物成熟阶段会掉落IA配置里的loot
|
#If disabled, you need to configurate the loot in ItemsAdder config
|
||||||
#如果关闭产物品质需要在IA物品配置内自行添加最后一阶段掉落物
|
#If enabled, make sure that your Grief Prevention Plugin is supported.
|
||||||
#如果你使用的领地插件不被兼容,请不要启用产物品质功能,
|
#Otherwise there might exists duplication.
|
||||||
#请立即更换领地插件或寻找作者写领地兼容
|
|
||||||
enable: true
|
enable: true
|
||||||
#默认品质权重比
|
#Default ratio
|
||||||
default-ratio: 17/2/1
|
default-ratio: 17/2/1
|
||||||
|
|
||||||
#异步时间检测,此设置需要重启生效
|
#Async Time Check (requires restart)
|
||||||
#启用异步时间检测会带来更好的性能但是可能会因为服务器的跳tick原因错过一些生长时间点
|
#Crops might not grow when using async.
|
||||||
|
#It is not really necessary to be Async
|
||||||
async-time-check: false
|
async-time-check: false
|
||||||
|
|
||||||
#使用一次水桶可以补充几个洒水器水槽
|
#Water Amount to refill when using water bucket
|
||||||
sprinkler-refill: 2
|
sprinkler-refill: 2
|
||||||
#水壶右键一次水方块能补充多少水量
|
#Water Amount to refill with a sigle click to water block
|
||||||
water-can-refill: 1
|
water-can-refill: 1
|
||||||
#是否可以用水壶为洒水器加水
|
#Can watering-can add water to sprinklers?
|
||||||
water-can-add-water-to-sprinkler: true
|
water-can-add-water-to-sprinkler: true
|
||||||
#使用水的时候是否产生粒子效果
|
#Should particles be displayed when using watering can?
|
||||||
water-particles: true
|
water-particles: true
|
||||||
|
|
||||||
#生长生效的世界
|
#Worlds where crops would grow
|
||||||
whitelist-worlds:
|
whitelist-worlds:
|
||||||
- world
|
- world
|
||||||
|
|
||||||
#每个区块最大农作物数量和洒水器数量
|
#Should we limit the max amount of crops and sprinkler in one chunk
|
||||||
#是否启用限制
|
#Recommended to enable because ItemsAdder might throw StackOverFlow
|
||||||
|
#when there are too many custom blocks in one chunk
|
||||||
limit:
|
limit:
|
||||||
enable: true
|
enable: true
|
||||||
crop: 64
|
crop: 64
|
||||||
sprinkler: 8
|
sprinkler: 8
|
||||||
|
|
||||||
#记录生长判断和洒水所需的时间(测试性能用)
|
#Test performance
|
||||||
log-time-consume: false
|
log-time-consume: false
|
||||||
|
|
||||||
#是否只有加载中的区块农作物才会生长
|
#Defaultly crops will only grow in loaded chunks.
|
||||||
#如果你不使用季节、可重复收获、巨大化农作物特性
|
#If you want a mechanic similar to OriginRealms just DISABLE SEASON, GIGANTIC(OverWeight) and REPEATED HARVESTING.
|
||||||
#插件data只会记录正在生长中某个阶段的农作物数据
|
#In this way crops data will be removed from file after it comes to its final stage.
|
||||||
#生长到最后一阶段农作物生长数据就会清除
|
#In other words, plugin will only record the crops still on growing.
|
||||||
#那么可以尝试设置此值为false来让数据内全部农作物生长
|
#NEVER SET "only-grow-in-loaded-chunks" FALSE IF YOU DON'T DISABLE THE THREE FEATURES MENTIONED ABOVE.
|
||||||
#如果你使用上述三个特性中的任意一个,请不要设置为false
|
#Otherwise it would be laggy because too many data in cache.
|
||||||
#否则农作物生长到最后一阶段不会从数据中清除,过大的数据量
|
|
||||||
#可能会导致服务器严重卡顿
|
|
||||||
only-grow-in-loaded-chunks: true
|
only-grow-in-loaded-chunks: true
|
||||||
|
|
||||||
#是否所有加载中的世界都要进行生长判断
|
#Should all the worlds' crops grow?
|
||||||
#本选项适用于使用玩家独立世界的服务器
|
#This is useful for per player per world server.
|
||||||
#因为有大量世界所以无法通过添加白名单世界的方式生长
|
#In this mode, whitelist world can only have one as the standard of time & season judgment.
|
||||||
#在此选项开启的状态下,白名单世界只能填写一个
|
|
||||||
#作为所有世界农作物生长的时间、季节判断依据
|
|
||||||
all-world-grow: false
|
all-world-grow: false
|
||||||
@@ -1,40 +1,35 @@
|
|||||||
#在IA配置文件中
|
#ItemsAdder items' name should end with "_seeds" "_stage_X"
|
||||||
#农作物种子ID请以 _seeds 结尾
|
#to be identified by the plugin
|
||||||
#农作物生长阶段请以 _stage_X 结尾
|
#Just read the default config and you will know how this plugin work
|
||||||
#生长阶段从1开始依次累加
|
|
||||||
#若无法理解可以参考范例配置文件
|
|
||||||
crops:
|
crops:
|
||||||
tomato:
|
tomato:
|
||||||
#收获时获取的基础数量
|
|
||||||
amount: 1~4
|
amount: 1~4
|
||||||
#农作物收获得到的三种品质
|
|
||||||
quality:
|
quality:
|
||||||
1: customcrops:tomato
|
1: customcrops:tomato
|
||||||
2: customcrops:tomato_silver_star
|
2: customcrops:tomato_silver_star
|
||||||
3: customcrops:tomato_golden_star
|
3: customcrops:tomato_golden_star
|
||||||
|
|
||||||
#巨大化植物,以极低的概率生长为另一种形态
|
#optional
|
||||||
|
#Overweight
|
||||||
gigantic:
|
gigantic:
|
||||||
block: customcrops:gigantic_tomato
|
block: customcrops:gigantic_tomato
|
||||||
chance: 0.01
|
chance: 0.01
|
||||||
|
|
||||||
#生长季节
|
|
||||||
season:
|
season:
|
||||||
- summer
|
- summer
|
||||||
- autumn
|
- autumn
|
||||||
|
|
||||||
|
#optional
|
||||||
|
#Requirements to plant
|
||||||
requirements:
|
requirements:
|
||||||
#适宜的生长高度
|
|
||||||
yPos:
|
yPos:
|
||||||
- 50~100
|
- 50~100
|
||||||
- 150~200
|
- 150~200
|
||||||
#适宜的生长群系
|
|
||||||
biome:
|
biome:
|
||||||
- minecraft:plains
|
- minecraft:plains
|
||||||
#适宜的世界
|
|
||||||
world:
|
world:
|
||||||
- world
|
- world
|
||||||
#种植此农作物需要玩家有什么权限
|
|
||||||
permission: 'customcrops.plant.tomato'
|
permission: 'customcrops.plant.tomato'
|
||||||
|
|
||||||
cabbage:
|
cabbage:
|
||||||
@@ -55,7 +50,8 @@ crops:
|
|||||||
1: customcrops:grape
|
1: customcrops:grape
|
||||||
2: customcrops:grape_silver_star
|
2: customcrops:grape_silver_star
|
||||||
3: customcrops:grape_golden_star
|
3: customcrops:grape_golden_star
|
||||||
#空手收获后返回第几个生长状态
|
#optional
|
||||||
|
#The stage to return when havesting with empty hands
|
||||||
return: customcrops:grape_stage_4
|
return: customcrops:grape_stage_4
|
||||||
season:
|
season:
|
||||||
- autumn
|
- autumn
|
||||||
|
|||||||
@@ -1,17 +1,14 @@
|
|||||||
#你可以自定义任意数量的肥料
|
#Crops have a small chance to grow two stages at a time
|
||||||
|
speed:
|
||||||
#有概率一次生长两个阶段
|
|
||||||
加速肥料:
|
|
||||||
speed_1:
|
speed_1:
|
||||||
#肥料名,用于悬浮展示
|
#Fertilizer Hologram display name
|
||||||
name: '뀌'
|
name: '뀌'
|
||||||
#生效的概率
|
|
||||||
chance: 0.1
|
chance: 0.1
|
||||||
#肥料在土壤中存留的生长周期数
|
#How many times can this fertilizer stay in pot
|
||||||
times: 14
|
times: 14
|
||||||
#命名空间随意,物品ID请保持一致
|
#ItemsAdder item namespacedID
|
||||||
item: customcrops:speed_1
|
item: customcrops:speed_1
|
||||||
#肥料是否只有在种植前才能使用
|
#Should this fertilizer be used before planting
|
||||||
before-plant: true
|
before-plant: true
|
||||||
|
|
||||||
speed_2:
|
speed_2:
|
||||||
@@ -27,8 +24,8 @@
|
|||||||
item: customcrops:speed_3
|
item: customcrops:speed_3
|
||||||
before-plant: true
|
before-plant: true
|
||||||
|
|
||||||
#土壤在生长点过后有一定概率仍然保持湿润
|
#Pot have a small chance to retain its water after crops grow
|
||||||
保湿肥料:
|
retaining:
|
||||||
retaining_1:
|
retaining_1:
|
||||||
name: '뀉'
|
name: '뀉'
|
||||||
chance: 0.1
|
chance: 0.1
|
||||||
@@ -50,8 +47,8 @@
|
|||||||
item: customcrops:retaining_3
|
item: customcrops:retaining_3
|
||||||
before-plant: false
|
before-plant: false
|
||||||
|
|
||||||
#更改农作物产物三种品质的权重
|
#When haveresting, players have a higher chance to get high quality crops.
|
||||||
品质肥料:
|
quality:
|
||||||
quality_1:
|
quality_1:
|
||||||
name: '뀆'
|
name: '뀆'
|
||||||
times: 28
|
times: 28
|
||||||
|
|||||||
60
src/main/resources/messages/messages_chinese.yml
Normal file
60
src/main/resources/messages/messages_chinese.yml
Normal file
@@ -0,0 +1,60 @@
|
|||||||
|
#MiniMessage Format
|
||||||
|
#https://docs.adventure.kyori.net/minimessage/format.html
|
||||||
|
messages:
|
||||||
|
prefix: '<gradient:#ff206c:#fdee55>[CustomCrops] </gradient>'
|
||||||
|
reload: '<white>重载成功! 耗时 <green>{time}ms'
|
||||||
|
no-perm: '<red>权限不足!'
|
||||||
|
lack-args: '<white>参数不足!'
|
||||||
|
wrong-args: '<white>参数错误!'
|
||||||
|
spring: '春'
|
||||||
|
summer: '夏'
|
||||||
|
autumn: '秋'
|
||||||
|
winter: '冬'
|
||||||
|
sprinkler-limit: '<white>此区块的洒水器已到达上限{max}'
|
||||||
|
crop-limit: '<white>此区块的农作物数量已到达上限{max}'
|
||||||
|
not-configed: '<white>此种子未在配置文件中配置!'
|
||||||
|
bad-Y: '<white>此高度不适合这种农作物生长!'
|
||||||
|
bad-biome: '<white>此生物群系不适合这种农作物生长!'
|
||||||
|
bad-perm: '<white>你还没有权限种植这种农作物呢!'
|
||||||
|
bad-world: '<white>这个农作物无法在这个世界生长!'
|
||||||
|
bad-season: '<white>当前季节不适合这种农作物生长!'
|
||||||
|
force-grow: '<white>成功强制 {world} 的农作物生长!'
|
||||||
|
force-water: '<white>成功强制 {world} 的洒水器洒水!'
|
||||||
|
force-save: '<white>成功强制保存缓存信息!'
|
||||||
|
back-up: '<white>已完成数据备份!'
|
||||||
|
set-season: '<white>成功切换世界 {world} 的季节为 {season}!'
|
||||||
|
before-plant: '<white>这种肥料必须在种植前使用!'
|
||||||
|
no-season: '当前世界没有季节'
|
||||||
|
|
||||||
|
#全息信息显示
|
||||||
|
hologram:
|
||||||
|
#农作物肥料信息
|
||||||
|
grow-info:
|
||||||
|
enable: true
|
||||||
|
#悬浮信息高度偏移
|
||||||
|
y-offset: 0.8
|
||||||
|
#悬浮信息持续时间(秒)
|
||||||
|
duration: 1
|
||||||
|
#悬浮信息内容
|
||||||
|
#可用变量 {fertilizer}肥料名 {times}剩余生效次数 {max_times}最大生效次数
|
||||||
|
text: '<font:customcrops:default>{fertilizer} </font><white>{times}<gray>/<white>{max_times}'
|
||||||
|
#洒水器信息
|
||||||
|
sprinkler-info:
|
||||||
|
enable: true
|
||||||
|
y-offset: -0.2
|
||||||
|
duration: 1
|
||||||
|
#可用变量 {water}当前水量 {max_water}最大蓄水量
|
||||||
|
left: '<font:customcrops:default>뀂'
|
||||||
|
full: '뀁뀃'
|
||||||
|
empty: '뀁뀄'
|
||||||
|
right: '뀁뀅</font>'
|
||||||
|
|
||||||
|
actionbar:
|
||||||
|
#使用水壶的时候是否发送actionbar
|
||||||
|
watering-can:
|
||||||
|
enable: true
|
||||||
|
#可用变量 {water}当前水量 {max_water}最大蓄水量
|
||||||
|
left: '<font:customcrops:default>뀂'
|
||||||
|
full: '뀁뀃'
|
||||||
|
empty: '뀁뀄'
|
||||||
|
right: '뀁뀅</font>'
|
||||||
57
src/main/resources/messages/messages_english.yml
Normal file
57
src/main/resources/messages/messages_english.yml
Normal file
@@ -0,0 +1,57 @@
|
|||||||
|
#MiniMessage Format
|
||||||
|
#https://docs.adventure.kyori.net/minimessage/format.html
|
||||||
|
messages:
|
||||||
|
prefix: '<gradient:#ff206c:#fdee55>[CustomCrops] </gradient>'
|
||||||
|
reload: '<white>Reloaded! Took <green>{time}ms'
|
||||||
|
no-perm: '<red>No Permission!'
|
||||||
|
lack-args: '<white>Arguments are insufficient!'
|
||||||
|
wrong-args: '<white>Wrong Args!'
|
||||||
|
spring: 'Spring'
|
||||||
|
summer: 'Summer'
|
||||||
|
autumn: 'Autumn'
|
||||||
|
winter: 'Winter'
|
||||||
|
sprinkler-limit: '<white>Sprinklers have reached chunk limitation {max}'
|
||||||
|
crop-limit: '<white>Crops have reached chunk limitation {max}'
|
||||||
|
not-configed: '<white>This seed is not configurated in config!'
|
||||||
|
bad-Y: '<white>This height is not suitable for planting!'
|
||||||
|
bad-biome: '<white>This biome is not suitable for planting!'
|
||||||
|
bad-perm: '<white>You don''t have permission to plant this crop!'
|
||||||
|
bad-world: '<white>This world is not suitable for planting'
|
||||||
|
bad-season: '<white>Current season is not suitable for planting'
|
||||||
|
force-grow: '<white>Forced {world}''s crops to start growing!'
|
||||||
|
force-water: '<white>Forced {world}''s sprinklers to start working!'
|
||||||
|
force-save: '<white>Successfully saved cache to file!'
|
||||||
|
back-up: '<white>Backed up!'
|
||||||
|
set-season: '<white>Changed {world}''s season to {season}!'
|
||||||
|
before-plant: '<white>This fertilizer must be used befored planting!'
|
||||||
|
no-season: 'Season Disabled'
|
||||||
|
|
||||||
|
#Holograms
|
||||||
|
hologram:
|
||||||
|
#Pot infomation
|
||||||
|
grow-info:
|
||||||
|
enable: true
|
||||||
|
y-offset: 0.8
|
||||||
|
duration: 1
|
||||||
|
#available variables {fertilizer} {times} {max_times}
|
||||||
|
text: '<font:customcrops:default>{fertilizer} </font><white>{times}<gray>/<white>{max_times}'
|
||||||
|
#Sprinkler infomation
|
||||||
|
sprinkler-info:
|
||||||
|
enable: true
|
||||||
|
y-offset: -0.2
|
||||||
|
duration: 1
|
||||||
|
#available variables {water} {max_water}
|
||||||
|
left: '<font:customcrops:default>뀂'
|
||||||
|
full: '뀁뀃'
|
||||||
|
empty: '뀁뀄'
|
||||||
|
right: '뀁뀅</font>'
|
||||||
|
|
||||||
|
actionbar:
|
||||||
|
#Should actionbar be sent when using watering-can
|
||||||
|
watering-can:
|
||||||
|
enable: true
|
||||||
|
#available variables {water} {max_water}
|
||||||
|
left: '<font:customcrops:default>뀂'
|
||||||
|
full: '뀁뀃'
|
||||||
|
empty: '뀁뀄'
|
||||||
|
right: '뀁뀅</font>'
|
||||||
0
src/main/resources/messages/messages_spanish.yml
Normal file
0
src/main/resources/messages/messages_spanish.yml
Normal file
@@ -1,17 +1,13 @@
|
|||||||
season:
|
season:
|
||||||
#是否使用季节限制
|
|
||||||
#非植物季节则无法耕种,过了季节则枯死
|
|
||||||
enable: true
|
enable: true
|
||||||
|
|
||||||
auto-season-change:
|
auto-season-change:
|
||||||
#是否启用内置季节交替
|
|
||||||
#启用此设置将根据服务器单个世界的游戏天数自动计算当前季节
|
|
||||||
enable: true
|
enable: true
|
||||||
#每个季节的时长(天)
|
#duration of each season
|
||||||
duration: 28
|
duration: 28
|
||||||
|
|
||||||
greenhouse:
|
greenhouse:
|
||||||
#温室系统,在温室玻璃正下方的方块可以无视季节种植
|
|
||||||
enable: true
|
enable: true
|
||||||
#温室玻璃有效范围
|
#effective range
|
||||||
range: 5
|
range: 5
|
||||||
@@ -1,28 +1,27 @@
|
|||||||
#使用水壶浇水的音效
|
|
||||||
water-pot:
|
water-pot:
|
||||||
sound: minecraft:block.water.ambient
|
sound: minecraft:block.water.ambient
|
||||||
type: player
|
type: player
|
||||||
#使用水壶装水的音效
|
|
||||||
add-water-to-can:
|
add-water-to-can:
|
||||||
sound: minecraft:item.bucket.fill
|
sound: minecraft:item.bucket.fill
|
||||||
type: player
|
type: player
|
||||||
#将水加入洒水器的音效
|
|
||||||
add-water-to-sprinkler:
|
add-water-to-sprinkler:
|
||||||
sound: minecraft:item.bucket.fill
|
sound: minecraft:item.bucket.fill
|
||||||
type: player
|
type: player
|
||||||
#放置洒水器的音效
|
|
||||||
place-sprinkler:
|
place-sprinkler:
|
||||||
sound: minecraft:block.bone_block.place
|
sound: minecraft:block.bone_block.place
|
||||||
type: player
|
type: player
|
||||||
#种植种子的音效
|
|
||||||
plant-seed:
|
plant-seed:
|
||||||
sound: minecraft:item.hoe.till
|
sound: minecraft:item.hoe.till
|
||||||
type: player
|
type: player
|
||||||
#使用肥料的音效
|
|
||||||
use-fertilizer:
|
use-fertilizer:
|
||||||
sound: minecraft:item.hoe.till
|
sound: minecraft:item.hoe.till
|
||||||
type: player
|
type: player
|
||||||
#空手收获的音效
|
|
||||||
harvest:
|
harvest:
|
||||||
sound: minecraft:block.crop.break
|
sound: minecraft:block.crop.break
|
||||||
type: player
|
type: player
|
||||||
66
src/main/resources/zh-cn/basic.yml
Normal file
66
src/main/resources/zh-cn/basic.yml
Normal file
@@ -0,0 +1,66 @@
|
|||||||
|
#填写IA物品的命名空间与物品ID
|
||||||
|
basic:
|
||||||
|
#植物的种植盆方块
|
||||||
|
pot: customcrops:pot
|
||||||
|
#植物的浇过水的种植盆方块
|
||||||
|
watered-pot: customcrops:watered_pot
|
||||||
|
#温室玻璃方块
|
||||||
|
greenhouse-glass: customcrops:greenhouse_glass
|
||||||
|
#农作物枯萎后变成的方块,物品ID中请保留stage以保持其下方方块被破坏时,枯萎作物也被破坏的特性
|
||||||
|
dead-crop: customcrops:crop_stage_death
|
||||||
|
#土质探测器,用于查看使用的肥料种类和残余量
|
||||||
|
soil-detector: customcrops:soil_detector
|
||||||
|
|
||||||
|
water-can:
|
||||||
|
watering_can_1:
|
||||||
|
item: customcrops:watering_can_1
|
||||||
|
#水壶最大容量
|
||||||
|
max: 3
|
||||||
|
#水壶工作的范围
|
||||||
|
width: 1
|
||||||
|
length: 1
|
||||||
|
watering_can_2:
|
||||||
|
item: customcrops:watering_can_2
|
||||||
|
max: 4
|
||||||
|
width: 1
|
||||||
|
length: 3
|
||||||
|
watering_can_3:
|
||||||
|
item: customcrops:watering_can_3
|
||||||
|
max: 5
|
||||||
|
width: 3
|
||||||
|
length: 3
|
||||||
|
watering_can_4:
|
||||||
|
item: customcrops:watering_can_4
|
||||||
|
max: 6
|
||||||
|
width: 3
|
||||||
|
length: 5
|
||||||
|
|
||||||
|
lore:
|
||||||
|
#是否修改水壶物品的Lore
|
||||||
|
watering-can:
|
||||||
|
enable: true
|
||||||
|
#Lore样式
|
||||||
|
lore:
|
||||||
|
- '<italic:false><white>{water_info}'
|
||||||
|
- '<italic:false><gray>右键水方块为水壶加水'
|
||||||
|
|
||||||
|
#水量 {water_info}
|
||||||
|
#可用变量 {water}当前水量 {max_water}最大蓄水量
|
||||||
|
left: '<font:customcrops:default>뀂'
|
||||||
|
full: '뀁뀃'
|
||||||
|
empty: '뀁뀄'
|
||||||
|
right: '뀁뀅</font>'
|
||||||
|
|
||||||
|
sprinkler:
|
||||||
|
sprinkler_1:
|
||||||
|
#洒水器工作范围
|
||||||
|
range: 1
|
||||||
|
#洒水器最大水储量
|
||||||
|
max-water: 5
|
||||||
|
3Ditem: customcrops:sprinkler_1
|
||||||
|
2Ditem: customcrops:sprinkler_1_item
|
||||||
|
sprinkler_2:
|
||||||
|
range: 2
|
||||||
|
max-water: 7
|
||||||
|
3Ditem: customcrops:sprinkler_2
|
||||||
|
2Ditem: customcrops:sprinkler_2_item
|
||||||
78
src/main/resources/zh-cn/config.yml
Normal file
78
src/main/resources/zh-cn/config.yml
Normal file
@@ -0,0 +1,78 @@
|
|||||||
|
config:
|
||||||
|
#插件兼容
|
||||||
|
integration:
|
||||||
|
Residence: false
|
||||||
|
WorldGuard: false
|
||||||
|
Kingdoms: false
|
||||||
|
GriefDefender: false
|
||||||
|
PlotSquared: false
|
||||||
|
Towny: false
|
||||||
|
Lands: false
|
||||||
|
|
||||||
|
#生长时间点(tick)
|
||||||
|
#1000代表上午7点,农作物陆续开始生长
|
||||||
|
#洒水器将会在农作物全部完成生长后开始工作
|
||||||
|
grow-time:
|
||||||
|
- 1000
|
||||||
|
|
||||||
|
#生长点后农作物成长所需的时间(秒)
|
||||||
|
#农作物将在60秒内随机完成生长以避免在短时间内大量方块替换造成卡顿
|
||||||
|
#但也不建议设置过长时间,否则内存无法及时释放,区块会被持续加载
|
||||||
|
#配合上方的默认时间点,意思为每天上午7点后,农作物将在60秒内完成生长过程
|
||||||
|
time-to-grow: 60
|
||||||
|
#农作物全部完成生长后洒水器工作所需的时间
|
||||||
|
time-to-work: 30
|
||||||
|
|
||||||
|
#产物品质
|
||||||
|
quality:
|
||||||
|
#若不启用则植物成熟阶段会掉落IA配置里的loot
|
||||||
|
#如果关闭产物品质需要在IA物品配置内自行添加最后一阶段掉落物
|
||||||
|
#如果你使用的领地插件不被兼容,请不要启用产物品质功能,
|
||||||
|
#请立即更换领地插件或寻找作者写领地兼容
|
||||||
|
enable: true
|
||||||
|
#默认品质权重比
|
||||||
|
default-ratio: 17/2/1
|
||||||
|
|
||||||
|
#异步时间检测,此设置需要重启生效
|
||||||
|
#启用异步时间检测会带来更好的性能但是可能会因为服务器的跳tick原因错过一些生长时间点
|
||||||
|
async-time-check: false
|
||||||
|
|
||||||
|
#使用一次水桶可以补充几个洒水器水槽
|
||||||
|
sprinkler-refill: 2
|
||||||
|
#水壶右键一次水方块能补充多少水量
|
||||||
|
water-can-refill: 1
|
||||||
|
#是否可以用水壶为洒水器加水
|
||||||
|
water-can-add-water-to-sprinkler: true
|
||||||
|
#使用水的时候是否产生粒子效果
|
||||||
|
water-particles: true
|
||||||
|
|
||||||
|
#生长生效的世界
|
||||||
|
whitelist-worlds:
|
||||||
|
- world
|
||||||
|
|
||||||
|
#每个区块最大农作物数量和洒水器数量
|
||||||
|
#是否启用限制
|
||||||
|
limit:
|
||||||
|
enable: true
|
||||||
|
crop: 64
|
||||||
|
sprinkler: 8
|
||||||
|
|
||||||
|
#记录生长判断和洒水所需的时间(测试性能用)
|
||||||
|
log-time-consume: false
|
||||||
|
|
||||||
|
#是否只有加载中的区块农作物才会生长
|
||||||
|
#如果你不使用季节、可重复收获、巨大化农作物特性
|
||||||
|
#插件data只会记录正在生长中某个阶段的农作物数据
|
||||||
|
#生长到最后一阶段农作物生长数据就会清除
|
||||||
|
#那么可以尝试设置此值为false来让数据内全部农作物生长
|
||||||
|
#如果你使用上述三个特性中的任意一个,请不要设置为false
|
||||||
|
#否则农作物生长到最后一阶段不会从数据中清除,过大的数据量
|
||||||
|
#可能会导致服务器严重卡顿
|
||||||
|
only-grow-in-loaded-chunks: true
|
||||||
|
|
||||||
|
#是否所有加载中的世界都要进行生长判断
|
||||||
|
#本选项适用于使用玩家独立世界的服务器
|
||||||
|
#因为有大量世界所以无法通过添加白名单世界的方式生长
|
||||||
|
#在此选项开启的状态下,白名单世界只能填写一个
|
||||||
|
#作为所有世界农作物生长的时间、季节判断依据
|
||||||
|
all-world-grow: false
|
||||||
71
src/main/resources/zh-cn/crops.yml
Normal file
71
src/main/resources/zh-cn/crops.yml
Normal file
@@ -0,0 +1,71 @@
|
|||||||
|
#在IA配置文件中
|
||||||
|
#农作物种子ID请以 _seeds 结尾
|
||||||
|
#农作物生长阶段请以 _stage_X 结尾
|
||||||
|
#生长阶段从1开始依次累加
|
||||||
|
#若无法理解可以参考范例配置文件
|
||||||
|
crops:
|
||||||
|
tomato:
|
||||||
|
#收获时获取的基础数量
|
||||||
|
amount: 1~4
|
||||||
|
#农作物收获得到的三种品质
|
||||||
|
quality:
|
||||||
|
1: customcrops:tomato
|
||||||
|
2: customcrops:tomato_silver_star
|
||||||
|
3: customcrops:tomato_golden_star
|
||||||
|
|
||||||
|
#巨大化植物,以极低的概率生长为另一种形态
|
||||||
|
gigantic:
|
||||||
|
block: customcrops:gigantic_tomato
|
||||||
|
chance: 0.01
|
||||||
|
|
||||||
|
#生长季节
|
||||||
|
season:
|
||||||
|
- summer
|
||||||
|
- autumn
|
||||||
|
|
||||||
|
requirements:
|
||||||
|
#适宜的生长高度
|
||||||
|
yPos:
|
||||||
|
- 50~100
|
||||||
|
- 150~200
|
||||||
|
#适宜的生长群系
|
||||||
|
biome:
|
||||||
|
- minecraft:plains
|
||||||
|
#适宜的世界
|
||||||
|
world:
|
||||||
|
- world
|
||||||
|
#种植此农作物需要玩家有什么权限
|
||||||
|
permission: 'customcrops.plant.tomato'
|
||||||
|
|
||||||
|
cabbage:
|
||||||
|
amount: 1~2
|
||||||
|
quality:
|
||||||
|
1: customcrops:cabbage
|
||||||
|
2: customcrops:cabbage_silver_star
|
||||||
|
3: customcrops:cabbage_golden_star
|
||||||
|
gigantic: customcrops:gigantic_cabbage
|
||||||
|
gigantic-chance: 0.01
|
||||||
|
season:
|
||||||
|
- spring
|
||||||
|
|
||||||
|
|
||||||
|
grape:
|
||||||
|
amount: 2~4
|
||||||
|
quality:
|
||||||
|
1: customcrops:grape
|
||||||
|
2: customcrops:grape_silver_star
|
||||||
|
3: customcrops:grape_golden_star
|
||||||
|
#空手收获后返回第几个生长状态
|
||||||
|
return: customcrops:grape_stage_4
|
||||||
|
season:
|
||||||
|
- autumn
|
||||||
|
|
||||||
|
corn:
|
||||||
|
amount: 1~2
|
||||||
|
quality:
|
||||||
|
1: customcrops:corn
|
||||||
|
2: customcrops:corn_silver_star
|
||||||
|
3: customcrops:corn_golden_star
|
||||||
|
season:
|
||||||
|
- autumn
|
||||||
|
- summer
|
||||||
74
src/main/resources/zh-cn/fertilizer.yml
Normal file
74
src/main/resources/zh-cn/fertilizer.yml
Normal file
@@ -0,0 +1,74 @@
|
|||||||
|
#你可以自定义任意数量的肥料
|
||||||
|
|
||||||
|
#有概率一次生长两个阶段
|
||||||
|
speed:
|
||||||
|
speed_1:
|
||||||
|
#肥料名,用于悬浮展示
|
||||||
|
name: '뀌'
|
||||||
|
#生效的概率
|
||||||
|
chance: 0.1
|
||||||
|
#肥料在土壤中存留的生长周期数
|
||||||
|
times: 14
|
||||||
|
#命名空间随意,物品ID请保持一致
|
||||||
|
item: customcrops:speed_1
|
||||||
|
#肥料是否只有在种植前才能使用
|
||||||
|
before-plant: true
|
||||||
|
|
||||||
|
speed_2:
|
||||||
|
name: '뀍'
|
||||||
|
chance: 0.2
|
||||||
|
times: 14
|
||||||
|
item: customcrops:speed_2
|
||||||
|
before-plant: true
|
||||||
|
speed_3:
|
||||||
|
name: '뀎'
|
||||||
|
chance: 0.3
|
||||||
|
times: 14
|
||||||
|
item: customcrops:speed_3
|
||||||
|
before-plant: true
|
||||||
|
|
||||||
|
#土壤在生长点过后有一定概率仍然保持湿润
|
||||||
|
retaining:
|
||||||
|
retaining_1:
|
||||||
|
name: '뀉'
|
||||||
|
chance: 0.1
|
||||||
|
times: 28
|
||||||
|
item: customcrops:retaining_1
|
||||||
|
before-plant: false
|
||||||
|
|
||||||
|
retaining_2:
|
||||||
|
name: '뀊'
|
||||||
|
chance: 0.2
|
||||||
|
times: 28
|
||||||
|
item: customcrops:retaining_2
|
||||||
|
before-plant: false
|
||||||
|
|
||||||
|
retaining_3:
|
||||||
|
name: '뀋'
|
||||||
|
chance: 0.3
|
||||||
|
times: 28
|
||||||
|
item: customcrops:retaining_3
|
||||||
|
before-plant: false
|
||||||
|
|
||||||
|
#更改农作物产物三种品质的权重
|
||||||
|
quality:
|
||||||
|
quality_1:
|
||||||
|
name: '뀆'
|
||||||
|
times: 28
|
||||||
|
chance: 7/2/1
|
||||||
|
item: customcrops:quality_1
|
||||||
|
before-plant: true
|
||||||
|
|
||||||
|
quality_2:
|
||||||
|
name: '뀇'
|
||||||
|
times: 28
|
||||||
|
chance: 11/6/3
|
||||||
|
item: customcrops:quality_2
|
||||||
|
before-plant: true
|
||||||
|
|
||||||
|
quality_3:
|
||||||
|
name: '뀈'
|
||||||
|
times: 28
|
||||||
|
chance: 2/2/1
|
||||||
|
item: customcrops:quality_3
|
||||||
|
before-plant: true
|
||||||
60
src/main/resources/zh-cn/messages.yml
Normal file
60
src/main/resources/zh-cn/messages.yml
Normal file
@@ -0,0 +1,60 @@
|
|||||||
|
#MiniMessage Format
|
||||||
|
#https://docs.adventure.kyori.net/minimessage/format.html
|
||||||
|
messages:
|
||||||
|
prefix: '<gradient:#ff206c:#fdee55>[CustomCrops] </gradient>'
|
||||||
|
reload: '<white>重载成功! 耗时 <green>{time}ms'
|
||||||
|
no-perm: '<red>权限不足!'
|
||||||
|
lack-args: '<white>参数不足!'
|
||||||
|
wrong-args: '<white>参数错误!'
|
||||||
|
spring: '春'
|
||||||
|
summer: '夏'
|
||||||
|
autumn: '秋'
|
||||||
|
winter: '冬'
|
||||||
|
sprinkler-limit: '<white>此区块的洒水器已到达上限{max}'
|
||||||
|
crop-limit: '<white>此区块的农作物数量已到达上限{max}'
|
||||||
|
not-configed: '<white>此种子未在配置文件中配置!'
|
||||||
|
bad-Y: '<white>此高度不适合这种农作物生长!'
|
||||||
|
bad-biome: '<white>此生物群系不适合这种农作物生长!'
|
||||||
|
bad-perm: '<white>你还没有权限种植这种农作物呢!'
|
||||||
|
bad-world: '<white>这个农作物无法在这个世界生长!'
|
||||||
|
bad-season: '<white>当前季节不适合这种农作物生长!'
|
||||||
|
force-grow: '<white>成功强制 {world} 的农作物生长!'
|
||||||
|
force-water: '<white>成功强制 {world} 的洒水器洒水!'
|
||||||
|
force-save: '<white>成功强制保存缓存信息!'
|
||||||
|
back-up: '<white>已完成数据备份!'
|
||||||
|
set-season: '<white>成功切换世界 {world} 的季节为 {season}!'
|
||||||
|
before-plant: '<white>这种肥料必须在种植前使用!'
|
||||||
|
no-season: '当前世界没有季节'
|
||||||
|
|
||||||
|
#全息信息显示
|
||||||
|
hologram:
|
||||||
|
#农作物肥料信息
|
||||||
|
grow-info:
|
||||||
|
enable: true
|
||||||
|
#悬浮信息高度偏移
|
||||||
|
y-offset: 0.8
|
||||||
|
#悬浮信息持续时间(秒)
|
||||||
|
duration: 1
|
||||||
|
#悬浮信息内容
|
||||||
|
#可用变量 {fertilizer}肥料名 {times}剩余生效次数 {max_times}最大生效次数
|
||||||
|
text: '<font:customcrops:default>{fertilizer} </font><white>{times}<gray>/<white>{max_times}'
|
||||||
|
#洒水器信息
|
||||||
|
sprinkler-info:
|
||||||
|
enable: true
|
||||||
|
y-offset: -0.2
|
||||||
|
duration: 1
|
||||||
|
#可用变量 {water}当前水量 {max_water}最大蓄水量
|
||||||
|
left: '<font:customcrops:default>뀂'
|
||||||
|
full: '뀁뀃'
|
||||||
|
empty: '뀁뀄'
|
||||||
|
right: '뀁뀅</font>'
|
||||||
|
|
||||||
|
actionbar:
|
||||||
|
#使用水壶的时候是否发送actionbar
|
||||||
|
watering-can:
|
||||||
|
enable: true
|
||||||
|
#可用变量 {water}当前水量 {max_water}最大蓄水量
|
||||||
|
left: '<font:customcrops:default>뀂'
|
||||||
|
full: '뀁뀃'
|
||||||
|
empty: '뀁뀄'
|
||||||
|
right: '뀁뀅</font>'
|
||||||
17
src/main/resources/zh-cn/season.yml
Normal file
17
src/main/resources/zh-cn/season.yml
Normal file
@@ -0,0 +1,17 @@
|
|||||||
|
season:
|
||||||
|
#是否使用季节限制
|
||||||
|
#非植物季节则无法耕种,过了季节则枯死
|
||||||
|
enable: true
|
||||||
|
|
||||||
|
auto-season-change:
|
||||||
|
#是否启用内置季节交替
|
||||||
|
#启用此设置将根据服务器单个世界的游戏天数自动计算当前季节
|
||||||
|
enable: true
|
||||||
|
#每个季节的时长(天)
|
||||||
|
duration: 28
|
||||||
|
|
||||||
|
greenhouse:
|
||||||
|
#温室系统,在温室玻璃正下方的方块可以无视季节种植
|
||||||
|
enable: true
|
||||||
|
#温室玻璃有效范围
|
||||||
|
range: 5
|
||||||
28
src/main/resources/zh-cn/sounds.yml
Normal file
28
src/main/resources/zh-cn/sounds.yml
Normal file
@@ -0,0 +1,28 @@
|
|||||||
|
#使用水壶浇水的音效
|
||||||
|
water-pot:
|
||||||
|
sound: minecraft:block.water.ambient
|
||||||
|
type: player
|
||||||
|
#使用水壶装水的音效
|
||||||
|
add-water-to-can:
|
||||||
|
sound: minecraft:item.bucket.fill
|
||||||
|
type: player
|
||||||
|
#将水加入洒水器的音效
|
||||||
|
add-water-to-sprinkler:
|
||||||
|
sound: minecraft:item.bucket.fill
|
||||||
|
type: player
|
||||||
|
#放置洒水器的音效
|
||||||
|
place-sprinkler:
|
||||||
|
sound: minecraft:block.bone_block.place
|
||||||
|
type: player
|
||||||
|
#种植种子的音效
|
||||||
|
plant-seed:
|
||||||
|
sound: minecraft:item.hoe.till
|
||||||
|
type: player
|
||||||
|
#使用肥料的音效
|
||||||
|
use-fertilizer:
|
||||||
|
sound: minecraft:item.hoe.till
|
||||||
|
type: player
|
||||||
|
#空手收获的音效
|
||||||
|
harvest:
|
||||||
|
sound: minecraft:block.crop.break
|
||||||
|
type: player
|
||||||
Reference in New Issue
Block a user