AchievementAPI
Functions
static addAchievement(achievementID, achievementName, requires = [])
Description
- Adds some achievement
Arguments
achievementID
- id of the achievementstring
achievementName
- name of the achievementarray
requires
- array of achievement ids that are required to be unlocked for player to be able to get the achievement.
Returns
true
if the achievement was added successfully,false
otherwise.
static grantAchievement(Player player, achievementID)
Description
- Gives some achievement to player
Arguments
Player
player
- [[Player]] instanceachievemenetID
- id of the achievement
Returns
true
if the achievement was granted,false
otherwise
static hasAchievement(Player player, achievementID)
Description
- Checks does a player have some achievement
Arguments
Player
player
- [[Player]] instanceachievemenetID
- id of the achievement
Returns
true
if the player has the achievement,false
otherwise
static broadcastAchievement(Player player, achievementID)
Description
- Broadcasts the achievement to the chat.
- If the achivement exists, the function will call [[achievement.broadcast|Events#achievement.broadcast]] event.
Arguments
Player
player
- [[Player]] instanceachievemenetID
- id of the achievement
Returns
true
if the achievement exists,false
otherwise
static removeAchievement(Player player, achievementID)
Description
- Removes the achievement from the player
Arguments
Player
player
- [[Player]] instanceachievemenetID
- id of the achievement
Returns
- nothing