Init API using static method

This commit is contained in:
Shevchik 2014-07-09 09:08:39 +04:00
parent 3b9b3c4fba
commit 05de30f689
2 changed files with 2 additions and 2 deletions

View File

@ -7,7 +7,7 @@ import com.cnaude.chairs.core.PlayerSitData;
public class ChairsAPI {
private static PlayerSitData pdata;
public ChairsAPI(PlayerSitData pdata) {
public static void init(PlayerSitData pdata) {
ChairsAPI.pdata = pdata;
}

View File

@ -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));
new ChairsAPI(getPlayerSitData());
ChairsAPI.init(getPlayerSitData());
}
@Override