1
0
mirror of https://e.coding.net/circlecloud/YumCore.git synced 2024-11-21 01:38:51 +00:00

fix: 修复注入类与玩家配置类的构造冲突

Signed-off-by: 502647092 <admin@yumc.pw>
This commit is contained in:
502647092 2016-08-25 01:10:01 +08:00
parent b4784c49ba
commit f2dbac8454
2 changed files with 4 additions and 5 deletions

View File

@ -4,7 +4,6 @@ import java.lang.reflect.Field;
import java.util.logging.Level;
import pw.yumc.YumCore.bukkit.Log;
import pw.yumc.YumCore.bukkit.P;
/**
* 配置自动载入类
@ -16,12 +15,12 @@ public abstract class InjectConfig extends AbstractInjectConfig {
protected FileConfig config;
public InjectConfig() {
config = new FileConfig(P.instance);
config = new FileConfig();
inject();
}
public InjectConfig(final String name) {
config = new FileConfig(P.instance, name);
config = new FileConfig(name);
inject();
}

View File

@ -33,7 +33,7 @@ public class PlayerConfig extends FileConfig {
* 玩家名称
*/
public PlayerConfig(final Plugin plugin, final Player playername) {
super(plugin, new File(plugin.getDataFolder(), CONFIG_FOLDER + File.separatorChar + playername.getName()));
super(new File(plugin.getDataFolder(), CONFIG_FOLDER + File.separatorChar + playername.getName()));
}
/**
@ -45,7 +45,7 @@ public class PlayerConfig extends FileConfig {
* 玩家
*/
public PlayerConfig(final Plugin plugin, final String player) {
super(plugin, new File(plugin.getDataFolder(), CONFIG_FOLDER + File.separatorChar + player));
super(new File(plugin.getDataFolder(), CONFIG_FOLDER + File.separatorChar + player));
}
/**