Warp Map Addon

Here you can view details on how to create a warp map addon using the Expansions API.

In Player Warps you can create a warp map addon that will allow add/remove/edit markers on the map plugin.

Registering

You can go here to learn on how to register an expansion.

Examples

Here is an example of a warp map addon class, this will let you be able to add/remove/edit markers on the map plugin.

import com.olziedev.playerwarps.api.expansion.WMapAddon;
import com.olziedev.playerwarps.api.warp.Warp;

public class ExampleMapExpansion extends WMapAddon {

    @Override
    public boolean isEnabled() {
        return true;
    }

    @Override
    public String getName() {
        return "Example Expansion";
    }

    @Override
    public void onLoad() {

    }

    @Override
    public void addMarker(Warp warp) {

    }

    @Override
    public void removeMarker(Warp warp) {

    }

    @Override
    public void updateMarker(Warp warp) {

    }

    @Override
    public void addNewWarps() {

    }
}

When using the addMarker, removeMarker, and updateMarker methods, you can use the warp object to get the location of the warp and what not.

The addNewWarps method is called when the plugin is enabled, this is so then the plugin can add all the warps to the map plugin when the server starts up.

Last updated