Search in sources :

Example 1 with PlaceHolderManager

use of au.com.mineauz.minigames.managers.PlaceHolderManager in project Minigames by AddstarMC.

the class Minigames method hookPlaceHolderApi.

private void hookPlaceHolderApi() {
    if (Bukkit.getPluginManager().getPlugin("PlaceholderAPI") != null) {
        hasPAPI = true;
        log.info("--------------------");
        log.info("Hooking PlaceHolder API");
        placeHolderManager = new PlaceHolderManager(this);
        placeHolderManager.register();
        log.info("Adding Placeholders for " + getMinigameManager().getAllMinigames().size() + " games");
        for (Map.Entry<String, Minigame> game : getMinigameManager().getAllMinigames().entrySet()) {
            log.fine("Adding Placeholders for " + game.getKey());
            placeHolderManager.addGameIdentifiers(game.getValue());
        }
        log.info("PlaceHolders: " + placeHolderManager.getRegisteredPlaceHolders().toString());
        log.info("--------------------");
    }
}
Also used : PlaceHolderManager(au.com.mineauz.minigames.managers.PlaceHolderManager) Minigame(au.com.mineauz.minigames.minigame.Minigame)

Aggregations

PlaceHolderManager (au.com.mineauz.minigames.managers.PlaceHolderManager)1 Minigame (au.com.mineauz.minigames.minigame.Minigame)1