Web Analytics

API Information

FateMeetup has an API so developers can hook into the plugin and get useful information. If you have issues with this API please contact us on discord.

package me.activated.uhcmeetup.api;

import me.activated.uhcmeetup.Fate;
import me.activated.uhcmeetup.files.*;
import me.activated.uhcmeetup.kits.Kit;
import me.activated.uhcmeetup.kits.KitsManager;
import me.activated.uhcmeetup.managers.GameManager;
import me.activated.uhcmeetup.managers.ProfileManager;
import me.activated.uhcmeetup.mongobase.MongoManager;
import me.activated.uhcmeetup.runnables.BorderRunnable;
import me.activated.uhcmeetup.runnables.GameRunnable;
import me.activated.uhcmeetup.scenario.Scenario;
import me.activated.uhcmeetup.scenario.ScenarioManager;
import me.activated.uhcmeetup.utils.player.Profile;
import me.activated.uhcmeetup.votes.Vote;
import me.activated.uhcmeetup.votes.VotesManager;
import org.bukkit.World;
import org.bukkit.entity.Player;

public class FateAPI {

    public static Profile getProfileByPlayer(Player player) {
        return ProfileManager.getInstance().getProfileByPlayer(player);
    }

    public static GameManager getGameManager() {
        return GameManager.getInstance();
    }

    public static ProfileManager getProfileManager() {
        return ProfileManager.getInstance();
    }

    public static Fate getMain() { return Fate.getInstance(); }

    public static KitsManager getKitsManager() {
        return KitsManager.getInstance();
    }

    public static ConfigFile getConfigFile() {
        return ConfigFile.getInstance();
    }

    public static ItemsFile getItemsFile() {
        return ItemsFile.getInstance();
    }

    public static KitsFile getKitsFile() {
        return KitsFile.getInstance();
    }

    public static MessagesFile getMessagesFile() {
        return MessagesFile.getInstance();
    }

    public static ScoreboardFile getScoreboardFile() {
        return ScoreboardFile.getInstance();
    }

    public static Kit getKit(int number) {
        return KitsManager.getInstance().getKitByNumber(number);
    }

    public static MongoManager getMongoManager() {
        return MongoManager.getInstance();
    }

    public static World getUHCMeetupWorld() {
        return GameManager.getInstance().getUhcMeetupWorld();
    }

    public static GameRunnable getGameRunnable() {
        return GameManager.getInstance().getGameRunnable();
    }

    public static BorderRunnable getBorderRunnable() {
        return GameManager.getInstance().getBorderRunnable();
    }

    public static Vote getVote (String name) {
        return VotesManager.getInstance().getVoteByName(name);
    }

    public static VotesManager getVotesManager() {
        return VotesManager.getInstance();
    }

    public static Scenario getScenario(String name) {
        return ScenarioManager.getInstance().getScenario(name);
    }

    public static ScenarioManager getScenarioManager() {
        return ScenarioManager.getInstance();
    }
}

Revision #1
Created Tue, Aug 6, 2019 8:19 PM by Noodles
Updated Sun, Sep 15, 2019 3:21 PM by Noodles