Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package org.projectbyte.bytecore.api;
- import java.util.Map;
- import java.util.UUID;
- import org.bukkit.entity.Player;
- import org.projectbyte.bytecore.ByteCore;
- import org.projectbyte.bytecore.cooldown.Cooldown;
- import org.projectbyte.bytecore.cooldown.CooldownManager;
- import org.projectbyte.bytecore.cooldown.CooldownType;
- import org.projectbyte.bytecore.faction.IFaction;
- import org.projectbyte.bytecore.game.Event;
- import org.projectbyte.bytecore.game.EventManager;
- import org.projectbyte.bytecore.game.EventType;
- import org.projectbyte.bytecore.kit.KitManager;
- import org.projectbyte.bytecore.mountain.Mountain;
- import org.projectbyte.bytecore.mountain.MountainManager;
- import org.projectbyte.bytecore.mountain.MountainType;
- import org.projectbyte.bytecore.profile.Profile;
- import org.projectbyte.bytecore.storage.IUserDataStorage;
- public class ByteAPI {
- private ByteCore plugin;
- public ByteAPI(ByteCore plugin) {
- this.plugin = plugin;
- }
- /**
- * Get the Profile of a player by providing a player Object
- *
- * @param player - A Player object
- * @return Profile of the player
- * @see getProfile(UUID uuid)
- */
- public Profile getProfile(Player player) {
- return plugin.getProfile(player);
- }
- /**
- * Get the Profile of a UUID by providing a Player's UUID
- *
- * @param uuid - The player's UUID
- * @return Profile of the UUID
- * @see getProfile(Player player)
- */
- public Profile getProfile(UUID uuid) {
- return plugin.getProfile(uuid);
- }
- /**
- * Get a Map which stores loaded profiles on the server
- *
- * @return Map<UUID, Profile> - key = Player's UUID, value = Matching Profile object
- */
- public Map<UUID, Profile> getProfiles() {
- return plugin.getProfiles();
- }
- /**
- * Get an Event object
- * <p>
- * You can use this Object to handle and manage the Event
- * @param eventType - An Enumeration EventType
- * @return the Event object
- * @see getEventManager()
- */
- public Event getEvent(EventType eventType) {
- return plugin.getEventManager().getEvent(eventType);
- }
- /**
- * Get a Mountain object
- * <p>
- * You can use to get the Cuboid instance of a Mountain or to
- * reset the mountain entirely
- * @param mountainType - An enumeration MountainType
- * @return the Mountain object
- * @see getMountainManager()
- */
- public Mountain getMountain(MountainType mountainType) {
- return plugin.getMountainManager().getMountain(mountainType);
- }
- /**
- * Get a Cooldown object
- * <p>
- * You can use a Cooldown object to apply certain timers/cooldowns to player
- * Profiles, as well as manage the cooldown's aspects such as who has a current
- * cooldown and it's time
- * @param cooldownType - An enumeration CooldownType
- * @return the Cooldown object
- * @see getCooldownManager()
- */
- public Cooldown getCooldown(CooldownType cooldownType) {
- return plugin.getCooldownManager().getCooldown(cooldownType);
- }
- /**
- * Get the EventMangager instance to manage Events
- * <p>
- * Currently, you can use the EventManager to get or add a certain Event object,
- * however, more will be added in the upcoming updates
- * @return the EventManager
- * @see getEvent(EventType eventType)
- */
- public EventManager getEventManager() {
- return plugin.getEventManager();
- }
- /**
- * Get the MountainManager instance to manage mountains
- * <p>
- * Currently, you can use the MountainManager to get or add a certain Mountain object,
- * however, more will be added in the upcoming updates
- * @return the MountainManager
- * @see getMountian(MountainType mountainType)
- */
- public MountainManager getMountainManager() {
- return plugin.getMountainManager();
- }
- /**
- * Get the CooldownManager instance to handle cooldowns/timers
- * <p>
- * Currently, you can use this manager to get a List of Cooldown objects which are loaded
- * into ByteCore, later on you will be able to add in your own cooldowns and manage each
- * loaded Cooldown object
- * @return the CooldownManager
- * @see getCooldown(CooldownType cooldownType)
- */
- public CooldownManager getCooldownManager() {
- return plugin.getCooldownManager();
- }
- /**
- * Get the KitManager instance to handle aspects of classes
- * <p>
- * Currently, you can use the KitManager to manager certain aspects of all of the classes
- * loaded in ByteCore, later on, you will be able to add in your own classes while allowing
- * to change and manage all effects and features of that class
- * @return the KitManager
- */
- public KitManager getKitManager() {
- return plugin.getKitManager();
- }
- /**
- * Get the supported Faction plugin for ByteCore
- *
- * @return an IFaction instance
- */
- public IFaction getSupportedFactionPlugin() {
- return plugin.getFactionSupportManager().getSupportedFaction();
- }
- /**
- * Get the UserDataStorage object that is being used by the core
- *
- * @return a IUserDataStorage instance
- */
- public IUserDataStorage getUserDataStorage() {
- return plugin.getUserDataStorageManager().getUserDataStorage();
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment