Skip to content
MrCubee edited this page Jul 16, 2022 · 2 revisions

JAVA

If you want to interact with the plugin, you will have various events and courses available to help you.

Interactions

Get a player's waypoint.

Example:

public WayPoint getPlayerWaypoint(final Player player, final String waypointName) {
    return WayPointStorage.getPlayerWayPoint(player, waypointName);
}

The Waypoint class is extended Bukkit's Location class.

Add a waypoint to the player.

Example:

public void setPlayerWaypoint(Player player, String waypointName, Location waypointLocation) {
    WayPointStorage.addPlayerWaypoint(player, waypointName, waypointLocation);
}

Deleted a player's waypoint.

Example:

public WayPoint removePlayerWaypoint(final Player player, final String waypointName) {
    return WayPointStorage.removePlayerWaypoint(player, waypointName);
}

Events

PlayerStartGPSEvent

Call when the player turns on their GPS.

PlayerStopGPSEvent

Call when the player turns off their GPS.

PlayerCreateWaypointEvent

Call when the player creates a waypoint.

PlayerRemoveWaypointEvent

Call when the player deletes a waypoint.

Skript

If you want to interact with the plugin, you will have various events and courses available to help you.

Interactions

Turn on player's gps

(set|setup|start|turn on|guide) %player%['s] gps to %location%

Turn off player's gps

(gsp stop|stop gps) [of] %player%
(stop|turn off) %player%['s] gps

Get a player's waypoint.

get %player%['s] waypoint[s]

Get specific player waypint.

get %player%['s] %string% waypoint

Add a waypoint to the player.

add %waypoint% to %player%
add %waypoint% to %player%['s] waypoint[s]

Deleted a player's waypoint.

(remove|delete) %waypoint% from %player%
(remove|delete) %string% from %player%

Events

PlayerStartGPSEvent

Call when the player turns on their GPS.

on player start gps:

PlayerStopGPSEvent

Call when the player turns off their GPS.

on player stop gps:

PlayerCreateWaypointEvent

Call when the player creates a waypoint.

on player create waypoint:

PlayerRemoveWaypointEvent

Call when the player deletes a waypoint.

on player remove waypoint:

Examples

Create waypoint command

command /cwp <string>
    trigger:
        set {_waypoint} to new