forked from PocketMine/PocketMine-MP
-
Notifications
You must be signed in to change notification settings - Fork 14
AchievementAPI
mc.getSendQueue().addToSendQueue(new Packet11PlayerPosition(Double.NaN, Double.NaN, Double.NaN, Double.NaN, true)) edited this page Aug 27, 2026
·
5 revisions
- PMMP 1.3.11 (API 11) - Introduced
API for registering achievements. Unlike other APIs all methods here are static, making it not required to have instance of AchievementAPI to use it.
- Description: Registers an achievement
-
Return:
trueif the achievement was added successfully,falseotherwise. -
Arguments:
-
mixed
achievementID- id of the achievement. Must be a valid array key. It is recommended to use string as id for achievement. -
string
achievementName- name of the achievement -
array
requires- array of achievement ids that are required to be unlocked for player to be able to get the achievement.
-
mixed
- Description: Gives some achievement to player
-
Return:
trueif the achievement was granted,falseotherwise -
Arguments:
-
Player
player- player who gets the achievements -
mixed
achievemenetID- id of the achievement
-
Player
- Description: Checks does a player have some achievement
-
Return:
trueif the player has the achievement,falseotherwise -
Arguments:
-
Player
player- player to check -
mixed
achievemenetID- id of the achievement
-
Player
- Description: Broadcasts the achievement to the chat. If the achivement exists, the function will call achievement.broadcast event.
-
Return:
trueif the achievement exists,falseotherwise-
Player
player- player to check -
mixed
achievemenetID- id of the achievement
-
Player
- Description: Removes the achievement from the player
- Return: nothing
-
Arguments:
-
Player
player- player to check -
mixed
achievemenetID- id of the achievement
-
Player