mirror of
https://gitlab.com/phoenix-dvpmt/mmocore.git
synced 2024-11-23 00:05:52 +01:00
Fixed guild loading
This commit is contained in:
parent
ac17103be8
commit
b3f1687aa9
@ -282,6 +282,11 @@ public class MMOCore extends JavaPlugin {
|
||||
*/
|
||||
Bukkit.getOnlinePlayers().forEach(player -> dataProvider.getDataManager().setup(player));
|
||||
|
||||
/*
|
||||
* load guild data after loading player data
|
||||
*/
|
||||
dataProvider.getGuildManager().load();
|
||||
|
||||
// commands
|
||||
try {
|
||||
final Field bukkitCommandMap = Bukkit.getServer().getClass().getDeclaredField("commandMap");
|
||||
|
@ -55,6 +55,7 @@ public abstract class GuildDataManager {
|
||||
return guilds.values();
|
||||
}
|
||||
|
||||
@Deprecated
|
||||
public void reload() {
|
||||
for (Guild guild : guilds.values())
|
||||
save(guild);
|
||||
@ -75,9 +76,7 @@ public abstract class GuildDataManager {
|
||||
private GuildConfiguration config;
|
||||
|
||||
public GuildConfiguration getConfig() {
|
||||
if (config == null)
|
||||
config = new GuildConfiguration();
|
||||
return config;
|
||||
return config == null ? config = new GuildConfiguration() : config;
|
||||
}
|
||||
|
||||
public class GuildConfiguration {
|
||||
|
Loading…
Reference in New Issue
Block a user