Package com.sucy.skill
Class SkillAPI
java.lang.Object
org.bukkit.plugin.PluginBase
org.bukkit.plugin.java.JavaPlugin
com.sucy.skill.SkillAPI
- All Implemented Interfaces:
org.bukkit.command.CommandExecutor
,org.bukkit.command.TabCompleter
,org.bukkit.command.TabExecutor
,org.bukkit.plugin.Plugin
- Direct Known Subclasses:
Fabled
Deprecated.
SkillAPI compatibility class for 3rd party plugins hooking into SkillAPI.
This likely is no longer a complete implementation of the original SkillAPI
class, but we will do our best to provide the necessary methods for
compatibility.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic AttributeManager
Deprecated, for removal: This API element is subject to removal in a future version.static List
<FabledClass> getBaseClasses
(String group) Deprecated, for removal: This API element is subject to removal in a future version.static FabledClass
Deprecated, for removal: This API element is subject to removal in a future version.static Map
<String, FabledClass> Deprecated, for removal: This API element is subject to removal in a future version.static ComboManager
Deprecated, for removal: This API element is subject to removal in a future version.static studio.magemonkey.codex.mccore.config.CommentedConfig
Deprecated, for removal: This API element is subject to removal in a future version.Deprecated, for removal: This API element is subject to removal in a future version.static studio.magemonkey.codex.mccore.config.CommentedLanguageConfig
Deprecated, for removal: This API element is subject to removal in a future version.static Object
Deprecated, for removal: This API element is subject to removal in a future version.static double
getMetaDouble
(org.bukkit.metadata.Metadatable target, String key) Deprecated, for removal: This API element is subject to removal in a future version.static int
getMetaInt
(org.bukkit.metadata.Metadatable target, String key) Deprecated, for removal: This API element is subject to removal in a future version.static Map
<UUID, PlayerAccounts> Deprecated, for removal: This API element is subject to removal in a future version.static PlayerAccounts
getPlayerAccountData
(org.bukkit.OfflinePlayer player) Deprecated, for removal: This API element is subject to removal in a future version.static PlayerData
getPlayerData
(org.bukkit.OfflinePlayer player) Deprecated, for removal: This API element is subject to removal in a future version.static Settings
Deprecated, for removal: This API element is subject to removal in a future version.static Skill
Deprecated, for removal: This API element is subject to removal in a future version.Deprecated, for removal: This API element is subject to removal in a future version.static boolean
hasPlayerData
(org.bukkit.OfflinePlayer player) Deprecated, for removal: This API element is subject to removal in a future version.static void
initFakeData
(org.bukkit.OfflinePlayer player) Deprecated, for removal: This API element is subject to removal in a future version.dont use itstatic Fabled
inst()
Deprecated, for removal: This API element is subject to removal in a future version.useFabled.inst()
static boolean
isClassRegistered
(String name) Deprecated, for removal: This API element is subject to removal in a future version.static boolean
isClassRegistered
(FabledClass fabledClass) Deprecated, for removal: This API element is subject to removal in a future version.static boolean
isClassRegistered
(PlayerClass playerClass) Deprecated, for removal: This API element is subject to removal in a future version.static boolean
isLoaded()
Deprecated, for removal: This API element is subject to removal in a future version.static boolean
isSkillRegistered
(String name) Deprecated, for removal: This API element is subject to removal in a future version.static boolean
isSkillRegistered
(PlayerSkill skill) Deprecated, for removal: This API element is subject to removal in a future version.static boolean
isSkillRegistered
(Skill skill) Deprecated, for removal: This API element is subject to removal in a future version.static PlayerAccounts
loadPlayerData
(org.bukkit.OfflinePlayer player) Deprecated, for removal: This API element is subject to removal in a future version.static void
reloadPlayerData
(org.bukkit.entity.Player player) Deprecated, for removal: This API element is subject to removal in a future version.usereloadPlayerData(Player)
(OfflinePlayer)}static void
removeMeta
(org.bukkit.metadata.Metadatable target, String key) Deprecated, for removal: This API element is subject to removal in a future version.static void
saveData()
Deprecated, for removal: This API element is subject to removal in a future version.static org.bukkit.scheduler.BukkitTask
Deprecated, for removal: This API element is subject to removal in a future version.static org.bukkit.scheduler.BukkitTask
schedule
(org.bukkit.scheduler.BukkitRunnable runnable, int delay) Deprecated, for removal: This API element is subject to removal in a future version.static org.bukkit.scheduler.BukkitTask
schedule
(org.bukkit.scheduler.BukkitRunnable runnable, int delay, int period) Deprecated, for removal: This API element is subject to removal in a future version.static void
Deprecated, for removal: This API element is subject to removal in a future version.static void
unloadPlayerData
(org.bukkit.OfflinePlayer player) Deprecated, for removal: This API element is subject to removal in a future version.static void
unloadPlayerData
(org.bukkit.OfflinePlayer player, boolean skipSaving) Deprecated, for removal: This API element is subject to removal in a future version.Methods inherited from class org.bukkit.plugin.java.JavaPlugin
getClassLoader, getCommand, getConfig, getDataFolder, getDefaultBiomeProvider, getDefaultWorldGenerator, getDescription, getFile, getLogger, getPlugin, getPluginLoader, getProvidingPlugin, getResource, getServer, getTextResource, isEnabled, isNaggable, onCommand, onDisable, onEnable, onLoad, onTabComplete, reloadConfig, saveConfig, saveDefaultConfig, saveResource, setEnabled, setNaggable, toString
Methods inherited from class org.bukkit.plugin.PluginBase
equals, getName, hashCode
-
Constructor Details
-
SkillAPI
Deprecated. -
SkillAPI
@Deprecated public SkillAPI(org.bukkit.plugin.java.JavaPluginLoader loader, org.bukkit.plugin.PluginDescriptionFile description, File dataFolder, File file) throws IOException Deprecated.- Throws:
IOException
-
-
Method Details
-
isLoaded
Deprecated, for removal: This API element is subject to removal in a future version.Checks whether Fabled has all its data loaded and running.- Returns:
- true if loaded and set up, false otherwise
-
inst
Deprecated, for removal: This API element is subject to removal in a future version.useFabled.inst()
This method no longer returns an instance of the _SkillAPI_ plugin, but instead returns an instanceof the _Fabled_ plugin. We've sort of wrapped the two together to provide increased compatibility, but this method will eventually be removed.- Returns:
- Fabled singleton if available
- Throws:
FabledNotEnabledException
- if Fabled isn't enabled
-
getSettings
Deprecated, for removal: This API element is subject to removal in a future version.Retrieves the settings data controlling Fabled- Returns:
- Fabled settings data
-
getLanguage
@Deprecated(forRemoval=true) public static studio.magemonkey.codex.mccore.config.CommentedLanguageConfig getLanguage()Deprecated, for removal: This API element is subject to removal in a future version.Retrieves the language file data for Fabled- Returns:
- Fabled language file data
-
getComboManager
Deprecated, for removal: This API element is subject to removal in a future version.Retrieves the manager for click cast combos- Returns:
- click combo manager
-
getAttributeManager
Deprecated, for removal: This API element is subject to removal in a future version.Retrieves the attribute manager for Fabled- Returns:
- attribute manager
-
getSkill
Deprecated, for removal: This API element is subject to removal in a future version.Retrieves a skill by name. If no skill is found with the name, null is returned instead.- Parameters:
name
- name of the skill- Returns:
- skill with the name or null if not found
-
getSkills
Deprecated, for removal: This API element is subject to removal in a future version.Retrieves the registered skill data for Fabled. It is recommended that you don't edit this map. Instead, use "addSkill" and "addSkills" instead.- Returns:
- the map of registered skills
-
isSkillRegistered
Deprecated, for removal: This API element is subject to removal in a future version.Checks whether a skill is registered.- Parameters:
name
- name of the skill- Returns:
- true if registered, false otherwise
-
isSkillRegistered
Deprecated, for removal: This API element is subject to removal in a future version.Checks whether a skill is registered- Parameters:
skill
- the skill to check- Returns:
- true if registered, false otherwise
-
isSkillRegistered
Deprecated, for removal: This API element is subject to removal in a future version.Checks whether a skill is registered- Parameters:
skill
- the skill to check- Returns:
- true if registered, false otherwise
-
getClass
Deprecated, for removal: This API element is subject to removal in a future version.Retrieves a class by name. If no skill is found with the name, null is returned instead.- Parameters:
name
- name of the class- Returns:
- class with the name or null if not found
-
getClasses
Deprecated, for removal: This API element is subject to removal in a future version.Retrieves the registered class data for Fabled. It is recommended that you don't edit this map. Instead, use "addClass" and "addClasses" instead.- Returns:
- the map of registered skills
-
getBaseClasses
Deprecated, for removal: This API element is subject to removal in a future version.Retrieves a list of base classes that don't profess from another class- Returns:
- the list of base classes
-
isClassRegistered
Deprecated, for removal: This API element is subject to removal in a future version.Checks whether a class is registered.- Parameters:
name
- name of the class- Returns:
- true if registered, false otherwise
-
isClassRegistered
Deprecated, for removal: This API element is subject to removal in a future version.Checks whether a class is registered.- Parameters:
playerClass
- the class to check- Returns:
- true if registered, false otherwise
-
isClassRegistered
Deprecated, for removal: This API element is subject to removal in a future version.Checks whether a class is registered.- Parameters:
fabledClass
- the class to check- Returns:
- true if registered, false otherwise
-
getPlayerData
@Deprecated(forRemoval=true) public static PlayerData getPlayerData(org.bukkit.OfflinePlayer player) Deprecated, for removal: This API element is subject to removal in a future version.Retrieves the active class data for the player. If no data is found for the player, a new set of data will be created and returned.- Parameters:
player
- player to get the data for- Returns:
- the class data of the player
-
loadPlayerData
@Deprecated(forRemoval=true) public static PlayerAccounts loadPlayerData(org.bukkit.OfflinePlayer player) Deprecated, for removal: This API element is subject to removal in a future version.Loads the data for a player when they join the server. This is handled by the API and doesn't need to be used elsewhere unless you want to load a player's data without them logging on. This should be run asynchronously since it is loading configuration files.- Parameters:
player
- player to load the data for
-
initFakeData
Deprecated, for removal: This API element is subject to removal in a future version.dont use itUsed to fake player data until SQL data is loaded when both SQL and the SQL delay are enabled. This should not be used by other plugins. If the player data already exists, this does nothing.- Parameters:
player
- player to fake data for
-
reloadPlayerData
Deprecated, for removal: This API element is subject to removal in a future version.usereloadPlayerData(Player)
(OfflinePlayer)}Do not use this method outside onJoin. This will delete any progress a player has made since joining. -
saveData
Deprecated, for removal: This API element is subject to removal in a future version.Saves all player data to the configs. This should be called asynchronously to avoid problems with the main server loop. -
hasPlayerData
Deprecated, for removal: This API element is subject to removal in a future version.Checks whether Fabled currently has loaded data for the given player. This returning false doesn't necessarily mean the player doesn't have any data at all, just not data that is currently loaded.- Parameters:
player
- player to check for- Returns:
- true if data has loaded, false otherwise
-
unloadPlayerData
Deprecated, for removal: This API element is subject to removal in a future version.Unloads player data from memory, saving it to the config first and then removing it from the map.- Parameters:
player
- player to unload data for
-
unloadPlayerData
@Deprecated(forRemoval=true) public static void unloadPlayerData(org.bukkit.OfflinePlayer player, boolean skipSaving) Deprecated, for removal: This API element is subject to removal in a future version.Unloads player data from memory, saving it to the config first and then removing it from the map.- Parameters:
player
- player to unload data forskipSaving
- whether to skip saving the data
-
getPlayerAccountData
@Deprecated(forRemoval=true) public static PlayerAccounts getPlayerAccountData(org.bukkit.OfflinePlayer player) Deprecated, for removal: This API element is subject to removal in a future version.Retrieves all class data for the player. This includes the active and all inactive accounts the player has. If no data is found, a new set of data will be created and returned.- Parameters:
player
- player to get the data for- Returns:
- the class data of the player
-
getPlayerAccountData
Deprecated, for removal: This API element is subject to removal in a future version.Retrieves all the player data of Fabled. It is recommended not to modify this map. Instead, use helper methods within individual player data.- Returns:
- all Fabled player data
-
getGroups
Deprecated, for removal: This API element is subject to removal in a future version.Retrieves the list of active class groups used by registered classes- Returns:
- list of active class groups
-
schedule
@Deprecated(forRemoval=true) public static org.bukkit.scheduler.BukkitTask schedule(org.bukkit.scheduler.BukkitRunnable runnable, int delay) Deprecated, for removal: This API element is subject to removal in a future version.Schedules a delayed task- Parameters:
runnable
- the task to scheduledelay
- the delay in ticks
-
schedule
@Deprecated(forRemoval=true) public static org.bukkit.scheduler.BukkitTask schedule(Runnable runnable, int delay) Deprecated, for removal: This API element is subject to removal in a future version.Schedules a delayed task- Parameters:
runnable
- the task to scheduledelay
- the delay in ticks
-
schedule
@Deprecated(forRemoval=true) public static org.bukkit.scheduler.BukkitTask schedule(org.bukkit.scheduler.BukkitRunnable runnable, int delay, int period) Deprecated, for removal: This API element is subject to removal in a future version.Schedules a repeating task- Parameters:
runnable
- the task to scheduledelay
- the delay in ticks before the first tickperiod
- how often to run in ticks
-
setMeta
@Deprecated(forRemoval=true) public static void setMeta(org.bukkit.metadata.Metadatable target, String key, Object value) Deprecated, for removal: This API element is subject to removal in a future version.Sets a value to an entity's metadata- Parameters:
target
- entity to set tokey
- key to store undervalue
- value to store
-
getMeta
@Deprecated(forRemoval=true) public static Object getMeta(org.bukkit.metadata.Metadatable target, String key) Deprecated, for removal: This API element is subject to removal in a future version.Retrieves metadata from an entity- Parameters:
target
- entity to retrieve fromkey
- key the value was stored under- Returns:
- the stored value
-
getMetaInt
@Deprecated(forRemoval=true) public static int getMetaInt(org.bukkit.metadata.Metadatable target, String key) Deprecated, for removal: This API element is subject to removal in a future version.Retrieves metadata from an entity- Parameters:
target
- entity to retrieve fromkey
- key the value was stored under- Returns:
- the stored value
-
getMetaDouble
@Deprecated(forRemoval=true) public static double getMetaDouble(org.bukkit.metadata.Metadatable target, String key) Deprecated, for removal: This API element is subject to removal in a future version.Retrieves metadata from an entity- Parameters:
target
- entity to retrieve fromkey
- key the value was stored under- Returns:
- the stored value
-
removeMeta
@Deprecated(forRemoval=true) public static void removeMeta(org.bukkit.metadata.Metadatable target, String key) Deprecated, for removal: This API element is subject to removal in a future version.Removes metadata from an entity- Parameters:
target
- entity to remove fromkey
- key metadata was stored under
-
getConfig
@Deprecated(forRemoval=true) public static studio.magemonkey.codex.mccore.config.CommentedConfig getConfig(String name) Deprecated, for removal: This API element is subject to removal in a future version.Grabs a config for Fabled- Parameters:
name
- config file name- Returns:
- config data
-
Fabled
instead