diff --git a/config/config.yml b/config/config.yml
index 3d7a4b2..14760b0 100644
--- a/config/config.yml
+++ b/config/config.yml
@@ -1,16 +1,23 @@
-# 插件提示前缀.
-pluginPrefix: '&4[&b限时权限&4]'
+# 插件前缀.
+# Plugin prefix.
+pluginPrefix: '&4[&bPermissions Time&4] '
# 是否开启DEBUG模式.
+# Whether to open the DEBUG mode.
debug: false
-# 是否同意插件统计信息.
+# 是否同意插件上传统计信息.
+# Whether or not you agree with the plugin to upload statistics.
metrics: true
# 语言文件名称 在'lang'文件夹内.
-lang: zh-cn
+# Language file name.
+lang: en
# 数据库相关.
+# Database settings.
mysql:
# 是否使用MySQL数据库.
+ # Whether to use the MySQL database.
enable: false
# 服务器唯一标识, 用来区分权限是哪个服务器的.
+ # Server ID.
serverId: default
hostname: localhost
port: 3306
@@ -18,4 +25,5 @@ mysql:
username: user
password: '123456'
# 数据库表前缀
+ # Database table prefix.
tablePrefix: pt_
diff --git a/pom.xml b/pom.xml
index c28d910..0791668 100644
--- a/pom.xml
+++ b/pom.xml
@@ -3,7 +3,7 @@
4.0.0
gg.frog.mc
permissionstime
- 0.2.2-SNAPSHOT
+ 0.2.3-SNAPSHOT
jar
PermissionsTime
支持跨服的权限限时插件
diff --git a/src/main/gg/frog/mc/permissionstime/PluginMain.java b/src/main/gg/frog/mc/permissionstime/PluginMain.java
index 3c6f3b1..2df511f 100644
--- a/src/main/gg/frog/mc/permissionstime/PluginMain.java
+++ b/src/main/gg/frog/mc/permissionstime/PluginMain.java
@@ -26,7 +26,7 @@ public class PluginMain extends JavaPlugin {
public String PLUGIN_VERSION;
public String PLUGIN_NAME_LOWER_CASE;
public static final String DEPEND_PLUGIN = "SQLibrary,Vault";
- public static Logger LOG = Logger.getLogger("Minecraft");
+ public static final Logger LOG = Logger.getLogger("Minecraft");
private ConfigManager cm = null;
private PluginMain pm = null;
diff --git a/src/main/gg/frog/mc/permissionstime/command/MainCommand.java b/src/main/gg/frog/mc/permissionstime/command/MainCommand.java
index ac80fb8..9672620 100644
--- a/src/main/gg/frog/mc/permissionstime/command/MainCommand.java
+++ b/src/main/gg/frog/mc/permissionstime/command/MainCommand.java
@@ -145,7 +145,6 @@ public class MainCommand implements CommandExecutor, TabCompleter {
if (!isPlayer || sender.isOp() || sender.hasPermission(pm.PLUGIN_NAME_LOWER_CASE + ".reload")) {
sender.sendMessage(StrUtil.messageFormat(LangCfg.CMD_RELOAD, pm.PLUGIN_NAME_LOWER_CASE));
}
- sender.sendMessage(StrUtil.messageFormat(PluginCfg.PLUGIN_PREFIX));
}
private boolean hasPermission(CommandSender sender, boolean isPlayer, String permissionPath) {
diff --git a/src/main/gg/frog/mc/permissionstime/config/ConfigManager.java b/src/main/gg/frog/mc/permissionstime/config/ConfigManager.java
index e66047f..940114e 100644
--- a/src/main/gg/frog/mc/permissionstime/config/ConfigManager.java
+++ b/src/main/gg/frog/mc/permissionstime/config/ConfigManager.java
@@ -74,8 +74,11 @@ public class ConfigManager {
@Override
public boolean isProcess(String fileName) {
- if (fileName.matches("lang/.+\\.yml")) {
- return true;
+ if (fileName.matches("lang/.+\\.yml") || "config.yml".equals(fileName) || "packages.yml".equals(fileName)) {
+ File f = new File(pm.getDataFolder(), fileName);
+ if (!f.exists()) {
+ return true;
+ }
}
return false;
}
diff --git a/src/main/gg/frog/mc/permissionstime/config/LangCfg.java b/src/main/gg/frog/mc/permissionstime/config/LangCfg.java
index fbe1489..4b88b48 100644
--- a/src/main/gg/frog/mc/permissionstime/config/LangCfg.java
+++ b/src/main/gg/frog/mc/permissionstime/config/LangCfg.java
@@ -104,14 +104,14 @@ public class LangCfg extends PluginConfig {
MSG_UNKNOWN_PACKAGE = getConfig().getString("msg.unknownPackage", "Unknown Packages");
MSG_IS_EXPIRATION_DATE = getConfig().getString("msg.isExpirationDate", "Your package: {0}({1})&r has expired.");
- CMD_HELP = getConfig().getString("cmd.help", "/{0} help -Show commands.");
- CMD_ME = getConfig().getString("cmd.me", "&6/{0} me \\n&8 - View self package.");
- CMD_PACKAGES = getConfig().getString("cmd.packages", "&6/{0} packages [packageName] \\n&8 - View packages.");
- CMD_GET = getConfig().getString("cmd.get", "&6/{0} get \\n&8 - View player packages.");
- CMD_GIVE = getConfig().getString("cmd.give", "&6/{0} give