NamelessMC

Internet Explorer

Internet Explorer is not supported. Please upgrade to a more modern browser.

How to add a custom avatar API?
Started by WylderLukas

WylderLukas

WylderLukas

Member
Joined
22 Nov 2020
Last Seen
22 Feb 2022
Topics
1
Posts
1

Good day,

I wanted to ask how to add an avatar API at "/panel/core/avatars/"?

 

With kind regards

WylderLukas · over 2 years ago
Samerton

Samerton

Owner
Joined
30 Mar 2015
Last Seen
22 Dec 2024
Topics
41
Posts
1076

Hi,

In order to do this, you need to create a custom module. This requires PHP knowledge - we have documentation available for module creation here: https://docs.namelessmc.com/en/module-documentation

You can then create an avatar source like this: https://github.com/NamelessMC/Nameless/blob/v2.0.0-pr12/modules/Core/classes/CrafatarAvatarSource.php

Then require it in your module.php and register it like this: https://github.com/NamelessMC/Nameless/blob/v2.0.0-pr12/modules/Core/module.php#L290

Samerton · over 2 years ago