This repository was archived by the owner on Feb 19, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 6
API
Steven Webster edited this page Sep 30, 2020
·
3 revisions
The API adds a way to easily interact with the plugin from your own plugins. Although most stuff is public anyways, this makes it a lot easier. This should be accessible via Subclass.API.
-
GiveClass(Player, SubClass) -> bool
- Gives a player a subclass if they don't have one and are the proper role.
- Returns true if the subclass was given, false otherwise.
-
RemoveClass(Player) -> bool
- Removes the player's subclass.
- Returns
trueif they had a subclass,falseotherwise.
-
GetClasses() -> Dictionary<string, SubClass>
- Returns a dictionary of subclasses mapped to their names.
-
EnableAllClasses() -> void
- Enables all loaded subclasses (Only subclasses that are enabled in their config are loaded).
-
DisableAllClasses() -> void
- Disables all loaded subclasses.
-
EnableClass(SubClass) -> bool
- Enables the subclass, returns
trueif it was successfully enabled, false otherwise. - Overload: EnableClass(String)
- Enables the subclass with the name provided.
- Enables the subclass, returns
-
DisableClass(SubClass) -> bool
- Disables the subclass, returns
trueif it was successfully disabled, false otherwise. - Overload: DisableClass(String)
- Disables the subclass with the name provided.
- Disables the subclass, returns
-
GetPlayersWithSubclasses() -> Dictionary<Player, SubClass>
- Returns a dictionary of subclasses mapped to the player that has them.
-
PlayerHasSubClass(Player) -> bool
- Returns
trueif the player has a subclass,falseotherwise.
- Returns
-
PlayerHasZombies(Player) -> bool
- Returns true if the player has zombies (necromancers).
-
PlayerHadZombies(Player) -> bool
- Returns
trueif the player had zombies and escaped (were necromancers),falseotherwise.
- Returns
-
PlayersZombies(Player) -> List
- Returns a list of the provided player's zombies, or
nullif they have none.
- Returns a list of the provided player's zombies, or
-
PlayersZombiesOld(Player) -> List
- Returns a list of the provided player's old zombies, or
nullif they had none.
- Returns a list of the provided player's old zombies, or
-
RevivedZombies() -> List
- Returns a list of players that were revived by necromancers (can be empty).
-
AbilityOnCooldown(Player, AbilityType) -> bool?
- Returns
trueif the ability is on cooldown,falseif it isn't ornullif the player doesn't have a subclass.
- Returns
-
TimeLeftOnCooldown(Player, AbilityType) -> float?
- Returns the time left on the cooldown of the provided ability for the player, or
nullif they don't have a subclass.
- Returns the time left on the cooldown of the provided ability for the player, or