Hide ChairsAPI init method
This commit is contained in:
parent
05de30f689
commit
e8c930e418
11
src/com/cnaude/chairs/api/APIInit.java
Normal file
11
src/com/cnaude/chairs/api/APIInit.java
Normal file
@ -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);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
@ -7,7 +7,7 @@ import com.cnaude.chairs.core.PlayerSitData;
|
|||||||
public class ChairsAPI {
|
public class ChairsAPI {
|
||||||
|
|
||||||
private static PlayerSitData pdata;
|
private static PlayerSitData pdata;
|
||||||
public static void init(PlayerSitData pdata) {
|
protected static void init(PlayerSitData pdata) {
|
||||||
ChairsAPI.pdata = pdata;
|
ChairsAPI.pdata = pdata;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -14,7 +14,7 @@ import org.bukkit.configuration.file.YamlConfiguration;
|
|||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
import org.bukkit.plugin.java.JavaPlugin;
|
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.ChairsCommand;
|
||||||
import com.cnaude.chairs.commands.ChairsIgnoreList;
|
import com.cnaude.chairs.commands.ChairsIgnoreList;
|
||||||
import com.cnaude.chairs.listeners.NANLoginListener;
|
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 TryUnsitEventListener(this), this);
|
||||||
getServer().getPluginManager().registerEvents(new CommandRestrict(this), this);
|
getServer().getPluginManager().registerEvents(new CommandRestrict(this), this);
|
||||||
getCommand("chairs").setExecutor(new ChairsCommand(this, ignoreList));
|
getCommand("chairs").setExecutor(new ChairsCommand(this, ignoreList));
|
||||||
ChairsAPI.init(getPlayerSitData());
|
new APIInit().initAPI(getPlayerSitData());
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
Loading…
Reference in New Issue
Block a user