mirror of
https://github.com/GeorgH93/Minepacks.git
synced 2024-11-15 10:55:20 +01:00
Bugfix
This commit is contained in:
parent
563a260248
commit
a7c12782d5
@ -17,7 +17,7 @@ command_cooldown: -1
|
|||||||
# If enabled, it can be disabled for individual players with the "backpack.KeepOnDeath" permission.
|
# If enabled, it can be disabled for individual players with the "backpack.KeepOnDeath" permission.
|
||||||
drop_on_death: true
|
drop_on_death: true
|
||||||
# Defines if the message that the backpack has been closed should be shown
|
# Defines if the message that the backpack has been closed should be shown
|
||||||
show_close_message: true
|
show_close_message: flase
|
||||||
|
|
||||||
# Controlls for the auto pickup on full inventory function
|
# Controlls for the auto pickup on full inventory function
|
||||||
full_inventory:
|
full_inventory:
|
||||||
|
@ -37,8 +37,8 @@ public Config(JavaPlugin plugin)
|
|||||||
@Override
|
@Override
|
||||||
protected boolean newConfigCreated()
|
protected boolean newConfigCreated()
|
||||||
{
|
{
|
||||||
config.set("Database.UseUUIDs", plugin.getServer().getOnlineMode() && isBukkitVersionUUIDCompatible());
|
config.set("Database.UseUUIDs", Bukkit.getServer().getOnlineMode() && isBukkitVersionUUIDCompatible());
|
||||||
return !(plugin.getServer().getOnlineMode() && isBukkitVersionUUIDCompatible());
|
return !(Bukkit.getServer().getOnlineMode() && isBukkitVersionUUIDCompatible());
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@ -48,19 +48,27 @@ protected void doUpdate()
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void doUpgrade(Configuration oldConfig)
|
protected void doUpgrade(at.pcgamingfreaks.Configuration oldConfig)
|
||||||
{
|
{
|
||||||
Set<String> keys = oldConfig.getConfig().getKeys(true);
|
Set<String> keys = oldConfig.getConfig().getKeys();
|
||||||
for(String key : keys)
|
for(String key : keys)
|
||||||
{
|
{
|
||||||
if(key.equals("UseUUIDs") || key.equals("Version")) continue;
|
if(key.equals("UseUUIDs") || key.equals("Version"))
|
||||||
config.set(key, oldConfig.getConfig().get(key));
|
continue;
|
||||||
|
try
|
||||||
|
{
|
||||||
|
config.set(key, oldConfig.getConfig().getString(key));
|
||||||
|
}
|
||||||
|
catch(Exception e)
|
||||||
|
{
|
||||||
|
e.printStackTrace();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if(!oldConfig.getConfig().isSet("Database.UseUUIDs"))
|
if(!oldConfig.getConfig().isSet("Database.UseUUIDs"))
|
||||||
{
|
{
|
||||||
if(oldConfig.getConfig().isSet("UseUUIDs"))
|
if(oldConfig.getConfig().isSet("UseUUIDs"))
|
||||||
{
|
{
|
||||||
config.set("Database.UseUUIDs", config.getBoolean("UseUUIDs"));
|
config.set("Database.UseUUIDs", config.getBoolean("UseUUIDs", true));
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -97,7 +105,7 @@ public String getMySQLUser()
|
|||||||
|
|
||||||
public String getMySQLPassword()
|
public String getMySQLPassword()
|
||||||
{
|
{
|
||||||
return config.getString("Database.MySQL.Password");
|
return config.getString("Database.MySQL.Password", "");
|
||||||
}
|
}
|
||||||
|
|
||||||
public String getUserTable()
|
public String getUserTable()
|
||||||
@ -112,7 +120,7 @@ public String getBackpackTable()
|
|||||||
|
|
||||||
public String getDBFields(String sub)
|
public String getDBFields(String sub)
|
||||||
{
|
{
|
||||||
return config.getString("Database.Tables.Fields." + sub);
|
return config.getString("Database.Tables.Fields." + sub, "");
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean getUpdatePlayer()
|
public boolean getUpdatePlayer()
|
||||||
|
Loading…
Reference in New Issue
Block a user