Init API using static method
This commit is contained in:
parent
3b9b3c4fba
commit
05de30f689
@ -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;
|
||||
}
|
||||
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user