Skip to content

Achievements

AlphaHelix edited this page Aug 25, 2017 · 5 revisions

How to create a Achievement?

The built-in Achievement API is very easy to use and only consits of one interface.

To create a new Achievement simply create a new class and call it whatever your Achievement should be named. And let it implement the "Achievement" interface.

public class TestAchievement implements Achievement {
    @Override
    public String getName() {
        return null;
    }

    @Override
    public InventoryItem getIcon() {
        return null;
    }

    @Override
    public List<String> getDescription() {
        return null;
    }
}

The name is used to identify the Achievement upon all others.

The icon is used to display the Achievement inside a gui.

The description is used as a help for the player, to achieve the Achievement.

If you want to store the players achievements you should take a look here or here.

Clone this wiki locally