mirror of
https://github.com/ColdeZhang/Dominion.git
synced 2025-02-05 06:19:30 +08:00
优化了 group limit 以支持 i18n
This commit is contained in:
parent
16728cce6d
commit
83a2daaaed
@ -16,7 +16,10 @@ import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
public class ConfigManager {
|
||||
public static ConfigManager instance;
|
||||
|
||||
public ConfigManager(Dominion plugin) {
|
||||
instance = this;
|
||||
new Translation(plugin);
|
||||
_plugin = plugin;
|
||||
_plugin.saveDefaultConfig();
|
||||
@ -87,11 +90,10 @@ public class ConfigManager {
|
||||
defaultGroup.setLimitAmount(_file.getInt("Limit.Amount", 10));
|
||||
defaultGroup.setLimitDepth(_file.getInt("Limit.Depth", 3));
|
||||
defaultGroup.setLimitVert(_file.getBoolean("Limit.Vert", false));
|
||||
defaultGroup.setWorldBlackList(_file.getStringList("Limit.WorldBlackList"));
|
||||
defaultGroup.setPrice(_file.getDouble("Economy.Price", 10.0));
|
||||
defaultGroup.setPriceOnlyXZ(_file.getBoolean("Economy.OnlyXZ", false));
|
||||
defaultGroup.setRefundRatio(_file.getDouble("Economy.Refund", 0.85));
|
||||
limits.put("default", defaultGroup);
|
||||
groupLimits.put("default", defaultGroup);
|
||||
|
||||
if (defaultGroup.getLimitSizeX() <= 4 && defaultGroup.getLimitSizeX() != -1) {
|
||||
XLogger.err(Translation.Config_Check_LimitSizeXError);
|
||||
@ -131,7 +133,7 @@ public class ConfigManager {
|
||||
setLimitDepth(3);
|
||||
}
|
||||
|
||||
limits.putAll(GroupLimit.loadGroups(_plugin));
|
||||
groupLimits.putAll(GroupLimit.loadGroups(_plugin));
|
||||
|
||||
saveAll(); // 回写文件 防止文件中的数据不完整
|
||||
Flag.loadFromFile(); // 加载 Flag 配置
|
||||
@ -163,24 +165,22 @@ public class ConfigManager {
|
||||
_file.setComments("Limit", List.of(Translation.Config_Comment_DefaultLimit.trans()));
|
||||
_file.set("Limit.SpawnProtection", _spawn_protection);
|
||||
_file.setInlineComments("Limit.SpawnProtection", List.of(Translation.Config_Comment_SpawnProtectRadius.trans() + Translation.Config_Comment_NegativeOneDisabled.trans()));
|
||||
_file.set("Limit.MinY", limits.get("default").getLimitMinY());
|
||||
_file.set("Limit.MinY", groupLimits.get("default").getLimitMinY());
|
||||
_file.setInlineComments("Limit.MinY", List.of(Translation.Config_Comment_MinY.trans()));
|
||||
_file.set("Limit.MaxY", limits.get("default").getLimitMaxY());
|
||||
_file.set("Limit.MaxY", groupLimits.get("default").getLimitMaxY());
|
||||
_file.setInlineComments("Limit.MaxY", List.of(Translation.Config_Comment_MaxY.trans()));
|
||||
_file.set("Limit.SizeX", limits.get("default").getLimitSizeX());
|
||||
_file.set("Limit.SizeX", groupLimits.get("default").getLimitSizeX());
|
||||
_file.setInlineComments("Limit.SizeX", List.of(Translation.Config_Comment_SizeX.trans() + Translation.Config_Comment_NegativeOneUnlimited.trans()));
|
||||
_file.set("Limit.SizeY", limits.get("default").getLimitSizeY());
|
||||
_file.set("Limit.SizeY", groupLimits.get("default").getLimitSizeY());
|
||||
_file.setInlineComments("Limit.SizeY", List.of(Translation.Config_Comment_SizeY.trans() + Translation.Config_Comment_NegativeOneUnlimited.trans()));
|
||||
_file.set("Limit.SizeZ", limits.get("default").getLimitSizeZ());
|
||||
_file.set("Limit.SizeZ", groupLimits.get("default").getLimitSizeZ());
|
||||
_file.setInlineComments("Limit.SizeZ", List.of(Translation.Config_Comment_SizeZ.trans() + Translation.Config_Comment_NegativeOneUnlimited.trans()));
|
||||
_file.set("Limit.Amount", limits.get("default").getLimitAmount());
|
||||
_file.set("Limit.Amount", groupLimits.get("default").getLimitAmount());
|
||||
_file.setInlineComments("Limit.Amount", List.of(Translation.Config_Comment_Amount.trans() + Translation.Config_Comment_NegativeOneUnlimited.trans()));
|
||||
_file.set("Limit.Depth", limits.get("default").getLimitDepth());
|
||||
_file.set("Limit.Depth", groupLimits.get("default").getLimitDepth());
|
||||
_file.setInlineComments("Limit.Depth", List.of(Translation.Config_Comment_Depth.trans() + Translation.Config_Comment_ZeroDisabled.trans() + Translation.Config_Comment_NegativeOneUnlimited.trans()));
|
||||
_file.set("Limit.Vert", limits.get("default").getLimitVert());
|
||||
_file.set("Limit.Vert", groupLimits.get("default").getLimitVert());
|
||||
_file.setInlineComments("Limit.Vert", List.of(Translation.Config_Comment_Vert.trans()));
|
||||
_file.set("Limit.WorldBlackList", limits.get("default").getWorldBlackList());
|
||||
_file.setInlineComments("Limit.WorldBlackList", List.of(Translation.Config_Comment_DisabledWorlds.trans()));
|
||||
_file.set("Limit.OpByPass", _limit_op_bypass);
|
||||
_file.setInlineComments("Limit.OpByPass", List.of(Translation.Config_Comment_OpBypass.trans()));
|
||||
|
||||
@ -198,11 +198,11 @@ public class ConfigManager {
|
||||
|
||||
_file.setComments("Economy", Arrays.asList(Translation.Config_Comment_Economy.trans(), Translation.Config_Comment_VaultRequired.trans()));
|
||||
_file.set("Economy.Enable", _economy_enable);
|
||||
_file.set("Economy.Price", limits.get("default").getPrice());
|
||||
_file.set("Economy.Price", groupLimits.get("default").getPrice());
|
||||
_file.setInlineComments("Economy.Price", List.of(Translation.Config_Comment_Price.trans()));
|
||||
_file.set("Economy.OnlyXZ", limits.get("default").getPriceOnlyXZ());
|
||||
_file.set("Economy.OnlyXZ", groupLimits.get("default").getPriceOnlyXZ());
|
||||
_file.setInlineComments("Economy.OnlyXZ", List.of(Translation.Config_Comment_OnlyXZ.trans()));
|
||||
_file.set("Economy.Refund", limits.get("default").getRefundRatio());
|
||||
_file.set("Economy.Refund", groupLimits.get("default").getRefundRatio());
|
||||
_file.setInlineComments("Economy.Refund", List.of(Translation.Config_Comment_Refund.trans()));
|
||||
|
||||
_file.set("FlyPermissionNodes", _fly_permission_nodes);
|
||||
@ -292,31 +292,31 @@ public class ConfigManager {
|
||||
}
|
||||
|
||||
public Integer getLimitSizeX(Player player) {
|
||||
return limits.get(getPlayerGroup(player)).getLimitSizeX();
|
||||
return groupLimits.get(getPlayerGroup(player)).getLimitSizeX();
|
||||
}
|
||||
|
||||
public void setLimitSizeX(Integer max_x) {
|
||||
limits.get("default").setLimitSizeX(max_x);
|
||||
groupLimits.get("default").setLimitSizeX(max_x);
|
||||
_file.set("Limit.SizeX", max_x);
|
||||
_plugin.saveConfig();
|
||||
}
|
||||
|
||||
public Integer getLimitSizeY(Player player) {
|
||||
return limits.get(getPlayerGroup(player)).getLimitSizeY();
|
||||
return groupLimits.get(getPlayerGroup(player)).getLimitSizeY();
|
||||
}
|
||||
|
||||
public void setLimitSizeY(Integer max_y) {
|
||||
limits.get("default").setLimitSizeY(max_y);
|
||||
groupLimits.get("default").setLimitSizeY(max_y);
|
||||
_file.set("Limit.SizeY", max_y);
|
||||
_plugin.saveConfig();
|
||||
}
|
||||
|
||||
public Integer getLimitSizeZ(Player player) {
|
||||
return limits.get(getPlayerGroup(player)).getLimitSizeZ();
|
||||
return groupLimits.get(getPlayerGroup(player)).getLimitSizeZ();
|
||||
}
|
||||
|
||||
public void setLimitSizeZ(Integer max_z) {
|
||||
limits.get("default").setLimitSizeZ(max_z);
|
||||
groupLimits.get("default").setLimitSizeZ(max_z);
|
||||
_file.set("Limit.SizeZ", max_z);
|
||||
_plugin.saveConfig();
|
||||
}
|
||||
@ -350,57 +350,59 @@ public class ConfigManager {
|
||||
}
|
||||
|
||||
public Integer getLimitMinY(Player player) {
|
||||
return limits.get(getPlayerGroup(player)).getLimitMinY();
|
||||
return groupLimits.get(getPlayerGroup(player)).getLimitMinY();
|
||||
}
|
||||
|
||||
public void setLimitMinY(Integer limit_bottom) {
|
||||
limits.get("default").setLimitMinY(limit_bottom);
|
||||
groupLimits.get("default").setLimitMinY(limit_bottom);
|
||||
_file.set("Limit.MinY", limit_bottom);
|
||||
_plugin.saveConfig();
|
||||
}
|
||||
|
||||
public Integer getLimitMaxY(Player player) {
|
||||
return limits.get(getPlayerGroup(player)).getLimitMaxY();
|
||||
return groupLimits.get(getPlayerGroup(player)).getLimitMaxY();
|
||||
}
|
||||
|
||||
public void setLimitMaxY(Integer limit_top) {
|
||||
limits.get("default").setLimitMaxY(limit_top);
|
||||
groupLimits.get("default").setLimitMaxY(limit_top);
|
||||
_file.set("Limit.MaxY", limit_top);
|
||||
_plugin.saveConfig();
|
||||
}
|
||||
|
||||
public Integer getLimitAmount(Player player) {
|
||||
return limits.get(getPlayerGroup(player)).getLimitAmount();
|
||||
return groupLimits.get(getPlayerGroup(player)).getLimitAmount();
|
||||
}
|
||||
|
||||
public void setLimitAmount(Integer limit_amount) {
|
||||
limits.get("default").setLimitAmount(limit_amount);
|
||||
groupLimits.get("default").setLimitAmount(limit_amount);
|
||||
_file.set("Limit.Amount", limit_amount);
|
||||
_plugin.saveConfig();
|
||||
}
|
||||
|
||||
public Integer getLimitDepth(Player player) {
|
||||
return limits.get(getPlayerGroup(player)).getLimitDepth();
|
||||
return groupLimits.get(getPlayerGroup(player)).getLimitDepth();
|
||||
}
|
||||
|
||||
public void setLimitDepth(Integer limit_depth) {
|
||||
limits.get("default").setLimitDepth(limit_depth);
|
||||
groupLimits.get("default").setLimitDepth(limit_depth);
|
||||
_file.set("Limit.Depth", limit_depth);
|
||||
_plugin.saveConfig();
|
||||
}
|
||||
|
||||
public Boolean getLimitVert(Player player) {
|
||||
return limits.get(getPlayerGroup(player)).getLimitVert();
|
||||
return groupLimits.get(getPlayerGroup(player)).getLimitVert();
|
||||
}
|
||||
|
||||
public void setLimitVert(Boolean limit_vert) {
|
||||
limits.get("default").setLimitVert(limit_vert);
|
||||
groupLimits.get("default").setLimitVert(limit_vert);
|
||||
_file.set("Limit.Vert", limit_vert);
|
||||
_plugin.saveConfig();
|
||||
}
|
||||
|
||||
public List<String> getWorldBlackList(Player player) {
|
||||
return limits.get(getPlayerGroup(player)).getWorldBlackList();
|
||||
// todo
|
||||
// return groupLimits.get(getPlayerGroup(player)).getWorldBlackList();
|
||||
return null;
|
||||
}
|
||||
|
||||
public Boolean getLimitOpBypass() {
|
||||
@ -468,31 +470,31 @@ public class ConfigManager {
|
||||
}
|
||||
|
||||
public Float getEconomyPrice(Player player) {
|
||||
return limits.get(getPlayerGroup(player)).getPrice().floatValue();
|
||||
return groupLimits.get(getPlayerGroup(player)).getPrice().floatValue();
|
||||
}
|
||||
|
||||
public void setEconomyPrice(Float economy_price) {
|
||||
limits.get("default").setPrice((double) economy_price);
|
||||
groupLimits.get("default").setPrice((double) economy_price);
|
||||
_file.set("Economy.Price", economy_price);
|
||||
_plugin.saveConfig();
|
||||
}
|
||||
|
||||
public Boolean getEconomyOnlyXZ(Player player) {
|
||||
return limits.get(getPlayerGroup(player)).getPriceOnlyXZ();
|
||||
return groupLimits.get(getPlayerGroup(player)).getPriceOnlyXZ();
|
||||
}
|
||||
|
||||
public void setEconomyOnlyXZ(Boolean economy_only_xz) {
|
||||
limits.get("default").setPriceOnlyXZ(economy_only_xz);
|
||||
groupLimits.get("default").setPriceOnlyXZ(economy_only_xz);
|
||||
_file.set("Economy.OnlyXZ", economy_only_xz);
|
||||
_plugin.saveConfig();
|
||||
}
|
||||
|
||||
public Float getEconomyRefund(Player player) {
|
||||
return limits.get(getPlayerGroup(player)).getRefundRatio().floatValue();
|
||||
return groupLimits.get(getPlayerGroup(player)).getRefundRatio().floatValue();
|
||||
}
|
||||
|
||||
public void setEconomyRefund(Float economy_refund) {
|
||||
limits.get("default").setRefundRatio((double) economy_refund);
|
||||
groupLimits.get("default").setRefundRatio((double) economy_refund);
|
||||
_file.set("Economy.Refund", economy_refund);
|
||||
_plugin.saveConfig();
|
||||
}
|
||||
@ -607,13 +609,13 @@ public class ConfigManager {
|
||||
private String _group_title_prefix;
|
||||
private String _group_title_suffix;
|
||||
|
||||
private final Map<String, GroupLimit> limits = new HashMap<>();
|
||||
private final Map<String, GroupLimit> groupLimits = new HashMap<>();
|
||||
|
||||
private String getPlayerGroup(@Nullable Player player) {
|
||||
if (player == null) {
|
||||
return "default";
|
||||
}
|
||||
for (String group : limits.keySet()) {
|
||||
for (String group : groupLimits.keySet()) {
|
||||
if (group.equals("default")) {
|
||||
continue;
|
||||
}
|
||||
|
@ -1,16 +1,18 @@
|
||||
package cn.lunadeer.dominion.managers;
|
||||
|
||||
import cn.lunadeer.dominion.Dominion;
|
||||
import cn.lunadeer.minecraftpluginutils.XLogger;
|
||||
import org.bukkit.configuration.file.YamlConfiguration;
|
||||
import org.bukkit.plugin.java.JavaPlugin;
|
||||
|
||||
import java.io.File;
|
||||
import java.util.Arrays;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
public class GroupLimit {
|
||||
private final YamlConfiguration config;
|
||||
private YamlConfiguration config;
|
||||
private final File file_path;
|
||||
private Integer min_y;
|
||||
private Integer max_y;
|
||||
@ -20,7 +22,6 @@ public class GroupLimit {
|
||||
private Integer amount;
|
||||
private Integer depth;
|
||||
private Boolean vert;
|
||||
private List<String> world_black_list;
|
||||
private Double price;
|
||||
private Boolean only_xz;
|
||||
private Double refund;
|
||||
@ -33,52 +34,52 @@ public class GroupLimit {
|
||||
public GroupLimit(File filePath) {
|
||||
this.file_path = filePath;
|
||||
config = YamlConfiguration.loadConfiguration(this.file_path);
|
||||
setLimitMinY(config.getInt("MinY", -64));
|
||||
setLimitMaxY(config.getInt("MaxY", 320));
|
||||
min_y = config.getInt("MinY", -64);
|
||||
max_y = config.getInt("MaxY", 320);
|
||||
if (getLimitMinY() >= getLimitMaxY()) {
|
||||
XLogger.err(Translation.Config_Check_GroupMinYError, this.file_path.getName());
|
||||
setLimitMinY(-64);
|
||||
setLimitMaxY(320);
|
||||
}
|
||||
setLimitSizeX(config.getInt("SizeX", 128));
|
||||
size_x = config.getInt("SizeX", 128);
|
||||
if (getLimitSizeX() <= 4 && getLimitSizeX() != -1) {
|
||||
XLogger.err(Translation.Config_Check_GroupSizeXError, this.file_path.getName());
|
||||
setLimitSizeX(128);
|
||||
}
|
||||
setLimitSizeY(config.getInt("SizeY", 64));
|
||||
size_y = config.getInt("SizeY", 64);
|
||||
if (getLimitSizeY() <= 4 && getLimitSizeY() != -1) {
|
||||
XLogger.err(Translation.Config_Check_GroupSizeYError, this.file_path.getName());
|
||||
setLimitSizeY(64);
|
||||
}
|
||||
setLimitSizeZ(config.getInt("SizeZ", 128));
|
||||
size_z = config.getInt("SizeZ", 128);
|
||||
if (getLimitSizeZ() <= 4 && getLimitSizeZ() != -1) {
|
||||
XLogger.err(Translation.Config_Check_GroupSizeZError, this.file_path.getName());
|
||||
setLimitSizeZ(128);
|
||||
}
|
||||
setLimitAmount(config.getInt("Amount", 10));
|
||||
amount = config.getInt("Amount", 10);
|
||||
if (getLimitAmount() <= 0 && getLimitAmount() != -1) {
|
||||
XLogger.err(Translation.Config_Check_GroupAmountError, this.file_path.getName());
|
||||
setLimitAmount(10);
|
||||
}
|
||||
setLimitDepth(config.getInt("Depth", 3));
|
||||
depth = config.getInt("Depth", 3);
|
||||
if (getLimitDepth() <= 0 && getLimitDepth() != -1) {
|
||||
XLogger.err(Translation.Config_Check_GroupDepthError, this.file_path.getName());
|
||||
setLimitDepth(3);
|
||||
}
|
||||
setLimitVert(config.getBoolean("Vert", false));
|
||||
setWorldBlackList(config.getStringList("WorldBlackList"));
|
||||
setPrice(config.getDouble("Price", 10.0));
|
||||
vert = config.getBoolean("Vert", false);
|
||||
price = config.getDouble("Price", 10.0);
|
||||
if (getPrice() < 0.0) {
|
||||
XLogger.err(Translation.Config_Check_GroupPriceError, this.file_path.getName());
|
||||
setPrice(10.0);
|
||||
}
|
||||
setPriceOnlyXZ(config.getBoolean("OnlyXZ", false));
|
||||
setRefundRatio(config.getDouble("Refund", 0.85));
|
||||
only_xz = config.getBoolean("OnlyXZ", false);
|
||||
refund = config.getDouble("Refund", 0.85);
|
||||
if (getRefundRatio() < 0.0 || getRefundRatio() > 1.0) {
|
||||
XLogger.err(Translation.Config_Check_GroupRefundError, this.file_path.getName());
|
||||
setRefundRatio(0.85);
|
||||
}
|
||||
save(); // 保存一次,确保文件中的数据是合法的
|
||||
saveAll();
|
||||
}
|
||||
|
||||
public Integer getLimitMinY() {
|
||||
@ -113,10 +114,6 @@ public class GroupLimit {
|
||||
return vert;
|
||||
}
|
||||
|
||||
public List<String> getWorldBlackList() {
|
||||
return world_black_list;
|
||||
}
|
||||
|
||||
public Double getPrice() {
|
||||
return price;
|
||||
}
|
||||
@ -178,12 +175,6 @@ public class GroupLimit {
|
||||
this.save();
|
||||
}
|
||||
|
||||
public void setWorldBlackList(List<String> world_black_list) {
|
||||
this.world_black_list = world_black_list;
|
||||
this.config.set("WorldBlackList", world_black_list);
|
||||
this.save();
|
||||
}
|
||||
|
||||
public void setPrice(Double price) {
|
||||
this.price = price;
|
||||
this.config.set("Price", price);
|
||||
@ -238,4 +229,47 @@ public class GroupLimit {
|
||||
XLogger.info(Translation.Messages_LoadedGroupAmount, groups.size());
|
||||
return groups;
|
||||
}
|
||||
|
||||
private void saveAll() {
|
||||
this.file_path.delete();
|
||||
this.config = new YamlConfiguration();
|
||||
this.config.set("MinY", min_y);
|
||||
this.config.setComments("MinY", Arrays.asList(
|
||||
Translation.Config_Comment_GroupLine1.trans(),
|
||||
Translation.Config_Comment_GroupLine2.trans(),
|
||||
Translation.Config_Comment_GroupLine3.trans(),
|
||||
Translation.Config_Comment_GroupLine4.trans(),
|
||||
Translation.Config_Comment_GroupLine5.trans(),
|
||||
Translation.Config_Comment_GroupLine6.trans(),
|
||||
Translation.Config_Comment_GroupLine7.trans(),
|
||||
String.format(Translation.Config_Comment_GroupLine8DocumentAddress.trans(), ConfigManager.instance.getLanguage())
|
||||
));
|
||||
this.config.setInlineComments("MinY", List.of(Translation.Config_Comment_MinY.trans()));
|
||||
this.config.set("MaxY", max_y);
|
||||
this.config.setInlineComments("MaxY", List.of(Translation.Config_Comment_MaxY.trans()));
|
||||
this.config.set("SizeX", size_x);
|
||||
this.config.setInlineComments("SizeX", List.of(Translation.Config_Comment_SizeX.trans() + Translation.Config_Comment_NegativeOneUnlimited.trans()));
|
||||
this.config.set("SizeY", size_y);
|
||||
this.config.setInlineComments("SizeY", List.of(Translation.Config_Comment_SizeY.trans() + Translation.Config_Comment_NegativeOneUnlimited.trans()));
|
||||
this.config.set("SizeZ", size_z);
|
||||
this.config.setInlineComments("SizeZ", List.of(Translation.Config_Comment_SizeZ.trans() + Translation.Config_Comment_NegativeOneUnlimited.trans()));
|
||||
this.config.set("Amount", amount);
|
||||
this.config.setInlineComments("Amount", List.of(Translation.Config_Comment_Amount.trans() + Translation.Config_Comment_NegativeOneUnlimited.trans()));
|
||||
this.config.set("Depth", depth);
|
||||
this.config.setInlineComments("Depth", List.of(Translation.Config_Comment_Depth.trans() + Translation.Config_Comment_ZeroDisabled.trans() + Translation.Config_Comment_NegativeOneUnlimited.trans()));
|
||||
this.config.set("Vert", vert);
|
||||
this.config.setInlineComments("Vert", List.of(Translation.Config_Comment_Vert.trans()));
|
||||
this.config.set("Price", price);
|
||||
this.config.setInlineComments("Price", List.of(Translation.Config_Comment_Price.trans()));
|
||||
this.config.set("OnlyXZ", only_xz);
|
||||
this.config.setInlineComments("OnlyXZ", List.of(Translation.Config_Comment_OnlyXZ.trans()));
|
||||
this.config.set("Refund", refund);
|
||||
this.config.setInlineComments("Refund", List.of(Translation.Config_Comment_Refund.trans()));
|
||||
|
||||
try {
|
||||
this.config.save(this.file_path);
|
||||
} catch (Exception e) {
|
||||
XLogger.err("Failed to save group limit file: " + this.file_path.getName());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -808,9 +808,6 @@ public class Translation extends Localization {
|
||||
@i18nField(defaultValue = "来自领地:")
|
||||
public static i18n TUI_TitleList_FromDominion;
|
||||
|
||||
@i18nField(defaultValue = "Dominion 系统配置")
|
||||
public static i18n TUI_Config_Title;
|
||||
|
||||
@i18nField(defaultValue = "输入要创建的领地名称")
|
||||
public static i18n CUI_Input_CreateDominion;
|
||||
@i18nField(defaultValue = "输入要创建的权限组名称")
|
||||
@ -907,8 +904,6 @@ public class Translation extends Localization {
|
||||
public static i18n Config_Comment_ZeroDisabled;
|
||||
@i18nField(defaultValue = "是否自动延伸到 MaxY 和 MinY")
|
||||
public static i18n Config_Comment_Vert;
|
||||
@i18nField(defaultValue = "不允许圈地的世界列表")
|
||||
public static i18n Config_Comment_DisabledWorlds;
|
||||
@i18nField(defaultValue = "是否允许OP无视领地限制")
|
||||
public static i18n Config_Comment_OpBypass;
|
||||
@i18nField(defaultValue = "传送延迟 秒")
|
||||
@ -941,6 +936,22 @@ public class Translation extends Localization {
|
||||
public static i18n Config_Comment_GroupTitleColor;
|
||||
@i18nField(defaultValue = "性能测试计时器")
|
||||
public static i18n Config_Comment_PerformanceTimer;
|
||||
@i18nField(defaultValue = ">---------------------------------<")
|
||||
public static i18n Config_Comment_GroupLine1;
|
||||
@i18nField(defaultValue = "| 圈地限制特殊权限组配置 |")
|
||||
public static i18n Config_Comment_GroupLine2;
|
||||
@i18nField(defaultValue = ">---------------------------------<")
|
||||
public static i18n Config_Comment_GroupLine3;
|
||||
@i18nField(defaultValue = "此文件可以作为模板,你可以将此文件复制后重命名为你想要的")
|
||||
public static i18n Config_Comment_GroupLine4;
|
||||
@i18nField(defaultValue = "权限组名,然后修改里面的配置如果你想给赞助玩家(或者VIP)")
|
||||
public static i18n Config_Comment_GroupLine5;
|
||||
@i18nField(defaultValue = "一些特殊优惠,例如更少的圈地价格、更大的领地等,你可以在")
|
||||
public static i18n Config_Comment_GroupLine6;
|
||||
@i18nField(defaultValue = "这里配置。详细说明参阅以下链接:")
|
||||
public static i18n Config_Comment_GroupLine7;
|
||||
@i18nField(defaultValue = "> https://dominion.lunadeer.cn/%s/operator/privilege.html")
|
||||
public static i18n Config_Comment_GroupLine8DocumentAddress;
|
||||
|
||||
@i18nField(defaultValue = "管理员")
|
||||
public static i18n Flags_admin_DisplayName;
|
||||
|
@ -20,7 +20,6 @@ Limit:
|
||||
Amount: 10
|
||||
Depth: 3
|
||||
Vert: false
|
||||
WorldBlackList: ['some_world']
|
||||
OpByPass: true
|
||||
|
||||
Teleport:
|
||||
|
@ -1,20 +1,11 @@
|
||||
# >---------------------------------<
|
||||
# | 圈地限制特殊权限组配置 |
|
||||
# >---------------------------------<
|
||||
# 此文件可以作为模板,你可以将此文件复制后重命名为你想要的权限组名,然后修改里面的配置
|
||||
# 如果你想给赞助玩家(或者VIP)一些特殊优惠,例如更少的圈地价格、更大的领地等,你可以在这里配置
|
||||
# 详细说明参阅 > https://ssl.lunadeer.cn:14448/doc/82/
|
||||
|
||||
|
||||
MinY: -64 # 最小Y坐标
|
||||
MaxY: 320 # 最大Y坐标
|
||||
SizeX: 128 # X方向最大长度 -1:表示不限制
|
||||
SizeY: 64 # Y方向最大长度 -1:表示不限制
|
||||
SizeZ: 128 # Z方向最大长度 -1:表示不限制
|
||||
Amount: 10 # 最大领地数量 -1:表示不限制
|
||||
Depth: 3 # 子领地深度 0:不允许子领地 -1:不限制
|
||||
Vert: false # 是否自动延伸到 MaxY 和 MinY
|
||||
WorldBlackList: [ ] # 不允许领地的世界
|
||||
Price: 10.0 # 方块单价
|
||||
OnlyXZ: false # 是否只计算xz平面积
|
||||
Refund: 0.85 # 删除领地退还比例
|
||||
MinY: -64
|
||||
MaxY: 320
|
||||
SizeX: 128
|
||||
SizeY: 64
|
||||
SizeZ: 128
|
||||
Amount: 10
|
||||
Depth: 3
|
||||
Vert: false
|
||||
Price: 10.0
|
||||
OnlyXZ: false
|
||||
Refund: 0.85
|
@ -410,8 +410,6 @@ TUI:
|
||||
RemoveButton: 卸下
|
||||
ApplyButton: 使用
|
||||
FromDominion: 来自领地:
|
||||
Config:
|
||||
Title: Dominion 系统配置
|
||||
CUI:
|
||||
Input:
|
||||
CreateDominion: 输入要创建的领地名称
|
||||
@ -465,7 +463,6 @@ Config:
|
||||
Depth: 子领地深度
|
||||
ZeroDisabled: 0表示不开启
|
||||
Vert: 是否自动延伸到 MaxY 和 MinY
|
||||
DisabledWorlds: 不允许圈地的世界列表
|
||||
OpBypass: 是否允许OP无视领地限制
|
||||
TpDelay: 传送延迟 秒
|
||||
TpCoolDown: 传送冷却 秒
|
||||
@ -482,6 +479,14 @@ Config:
|
||||
GroupTitleVariable: '变量: %dominion_group_title%'
|
||||
GroupTitleColor: 前后缀如需要加颜色请使用这种格式 &#ffffff
|
||||
PerformanceTimer: 性能测试计时器
|
||||
GroupLine1: '>---------------------------------<'
|
||||
GroupLine2: '| 圈地限制特殊权限组配置 |'
|
||||
GroupLine3: '>---------------------------------<'
|
||||
GroupLine4: 此文件可以作为模板,你可以将此文件复制后重命名为你想要的
|
||||
GroupLine5: 权限组名,然后修改里面的配置如果你想给赞助玩家(或者VIP)
|
||||
GroupLine6: 一些特殊优惠,例如更少的圈地价格、更大的领地等,你可以在
|
||||
GroupLine7: 这里配置。详细说明参阅以下链接:
|
||||
GroupLine8DocumentAddress: '> https://dominion.lunadeer.cn/%s/operator/privilege.html'
|
||||
Flags:
|
||||
admin:
|
||||
DisplayName: 管理员
|
||||
|
Loading…
Reference in New Issue
Block a user