TrMenu
FrancoBM12 edited this page Feb 2, 2023
·
4 revisions
It's simple, download the MagicCosmetics compatible plugin, add it to your plugins folder, start the server and you're ready to use it as you like!
Examples
source:JS:magicApi.getCosmetic("id") #returns the specified cosmetic item.
source:JS:magicApi.hasCosmetic("id") #check if the cosmetic exists on the server.
source:JS:magicApi.getEquipped("FrancoBM", "HAT") #get the itemstack of the cosmetic of type "HAT".
source:JS:magicApi.hasEquipped("FrancoBM", "HAT") #check if the player has a "HAT" type cosmetic equipped.
source:JS:magicApi.hasCosmetic("FrancoBM", "id") #checks if the player has the cosmetic unlocked.
source:JS:magicApi.getPlayerAllCosmeticsAvailable("FrancoBM") #returns the amount of cosmetics that the player has unlocked.
source:JS:magicApi.getServerAllCosmeticsAvailable() #returns the number of cosmetics that exist on the server.