forked from Upstream/mmocore
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));
|
Bukkit.getOnlinePlayers().forEach(player -> dataProvider.getDataManager().setup(player));
|
||||||
|
|
||||||
|
/*
|
||||||
|
* load guild data after loading player data
|
||||||
|
*/
|
||||||
|
dataProvider.getGuildManager().load();
|
||||||
|
|
||||||
// commands
|
// commands
|
||||||
try {
|
try {
|
||||||
final Field bukkitCommandMap = Bukkit.getServer().getClass().getDeclaredField("commandMap");
|
final Field bukkitCommandMap = Bukkit.getServer().getClass().getDeclaredField("commandMap");
|
||||||
|
@ -55,6 +55,7 @@ public abstract class GuildDataManager {
|
|||||||
return guilds.values();
|
return guilds.values();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Deprecated
|
||||||
public void reload() {
|
public void reload() {
|
||||||
for (Guild guild : guilds.values())
|
for (Guild guild : guilds.values())
|
||||||
save(guild);
|
save(guild);
|
||||||
@ -75,9 +76,7 @@ public abstract class GuildDataManager {
|
|||||||
private GuildConfiguration config;
|
private GuildConfiguration config;
|
||||||
|
|
||||||
public GuildConfiguration getConfig() {
|
public GuildConfiguration getConfig() {
|
||||||
if (config == null)
|
return config == null ? config = new GuildConfiguration() : config;
|
||||||
config = new GuildConfiguration();
|
|
||||||
return config;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public class GuildConfiguration {
|
public class GuildConfiguration {
|
||||||
|
Loading…
Reference in New Issue
Block a user