mirror of
https://gitlab.com/phoenix-dvpmt/mmocore.git
synced 2024-11-29 01:05:40 +01:00
Fixed an issue with player loading when guild data file is missing
This commit is contained in:
parent
ed9a9353aa
commit
22e5947112
@ -76,7 +76,7 @@ public class MMOCoreDataSynchronizer extends SQLDataSynchronizer<PlayerData> {
|
||||
getData().setUnlockedItems(unlockedItems);
|
||||
if (!isEmpty(result.getString("guild"))) {
|
||||
final Guild guild = MMOCore.plugin.nativeGuildManager.getGuild(result.getString("guild"));
|
||||
if (guild != null) getData().setGuild(guild.hasMember(getData().getUniqueId()) ? guild : null);
|
||||
if (guild != null && guild.hasMember(getData().getUniqueId())) getData().setGuild(guild);
|
||||
}
|
||||
if (!isEmpty(result.getString("attributes"))) getData().getAttributes().load(result.getString("attributes"));
|
||||
if (getData().isOnline())
|
||||
|
@ -58,8 +58,8 @@ public class YAMLPlayerDataHandler extends YAMLSynchronizedDataHandler<PlayerDat
|
||||
if (config.contains("class")) data.setClass(MMOCore.plugin.classManager.get(config.getString("class")));
|
||||
|
||||
if (config.contains("guild")) {
|
||||
Guild guild = MMOCore.plugin.nativeGuildManager.getGuild(config.getString("guild"));
|
||||
data.setGuild(guild.hasMember(data.getUniqueId()) ? guild : null);
|
||||
final Guild guild = MMOCore.plugin.nativeGuildManager.getGuild(config.getString("guild"));
|
||||
if (guild != null && guild.hasMember(data.getUniqueId())) data.setGuild(guild);
|
||||
}
|
||||
if (config.contains("attribute"))
|
||||
data.getAttributes().load(config.getConfigurationSection("attribute"));
|
||||
|
Loading…
Reference in New Issue
Block a user