PlanLite API
-
API Code on Github
Importing PlanAPI:
Code (Text):import com.djrapitops.planlite.api.API
import com.djrapitops.planlite.api.DataPoint
import com.djrapitops.planlite.api.DataType
import static org.bukkit.plugin.java.JavaPlugin.getPlugin;
API api = getPlugin(PlanLite.class).getAPI();
You need a class that implements Hook:
Code (Text):import java.util.HashMap;
public interface Hook {
public HashMap<String, DataPoint> getData(String player) throws Exception;
public HashMap<String, DataPoint> getAllData(String player) throws Exception;
}
Code (Text):data.put("XXX-DATA POINT NAME", new DataPoint(yourDataString, DataType.TYPE);
After you have your class, you can use the API during your plugins start-up to register the hook:
Code (Text):Hook hook = new YourHookClass();
api.addExtraHook("YourPluginName", hook); - Loading...
- Loading...
XenCarta PRO
© Jason Axelrod from 8WAYRUN.COM