diff --git a/src/com/cnaude/chairs/api/APIInit.java b/src/com/cnaude/chairs/api/APIInit.java new file mode 100644 index 0000000..06cfe8f --- /dev/null +++ b/src/com/cnaude/chairs/api/APIInit.java @@ -0,0 +1,11 @@ +package com.cnaude.chairs.api; + +import com.cnaude.chairs.core.PlayerSitData; + +public class APIInit { + + public void initAPI(PlayerSitData data) { + ChairsAPI.init(data); + } + +} diff --git a/src/com/cnaude/chairs/api/ChairsAPI.java b/src/com/cnaude/chairs/api/ChairsAPI.java index 7c2abbf..87cdbeb 100644 --- a/src/com/cnaude/chairs/api/ChairsAPI.java +++ b/src/com/cnaude/chairs/api/ChairsAPI.java @@ -7,7 +7,7 @@ import com.cnaude.chairs.core.PlayerSitData; public class ChairsAPI { private static PlayerSitData pdata; - public static void init(PlayerSitData pdata) { + protected static void init(PlayerSitData pdata) { ChairsAPI.pdata = pdata; } diff --git a/src/com/cnaude/chairs/core/Chairs.java b/src/com/cnaude/chairs/core/Chairs.java index 3c81d85..6275cf9 100644 --- a/src/com/cnaude/chairs/core/Chairs.java +++ b/src/com/cnaude/chairs/core/Chairs.java @@ -14,7 +14,7 @@ import org.bukkit.configuration.file.YamlConfiguration; import org.bukkit.entity.Player; import org.bukkit.plugin.java.JavaPlugin; -import com.cnaude.chairs.api.ChairsAPI; +import com.cnaude.chairs.api.APIInit; import com.cnaude.chairs.commands.ChairsCommand; import com.cnaude.chairs.commands.ChairsIgnoreList; import com.cnaude.chairs.listeners.NANLoginListener; @@ -83,7 +83,7 @@ public class Chairs extends JavaPlugin { getServer().getPluginManager().registerEvents(new TryUnsitEventListener(this), this); getServer().getPluginManager().registerEvents(new CommandRestrict(this), this); getCommand("chairs").setExecutor(new ChairsCommand(this, ignoreList)); - ChairsAPI.init(getPlayerSitData()); + new APIInit().initAPI(getPlayerSitData()); } @Override