Package journeymap.api.v2.server
Interface IServerAPI
- All Superinterfaces:
CommonAPI
Server-side JourneyMap API for reading and manipulating waypoints.
-
Method Summary
Modifier and TypeMethodDescriptionvoidaddGlobalGroup(WaypointGroup group) Adds or updates a global waypoint group.voidaddGlobalWaypoint(Waypoint waypoint) Adds or updates a global waypoint.voidaddPlayerGroup(UUID playerUUID, WaypointGroup group) Adds or updates a waypoint group for the specified player.voidaddPlayerWaypoint(UUID playerUUID, Waypoint waypoint) Adds or updates a waypoint for the specified player.voiddeleteGlobalGroup(String guid, boolean deleteWaypoints) Deletes the global waypoint group with the given GUID.voiddeleteGlobalWaypoint(String guid) Deletes the global waypoint with the given GUID.voiddeletePlayerGroup(UUID playerUUID, String guid, boolean deleteWaypoints) Deletes the waypoint group with the given GUID for the specified player.voiddeletePlayerWaypoint(UUID playerUUID, String guid) Deletes the waypoint with the given GUID for the specified player.Gets all global waypoint groups.getAllGroups(UUID playerUUID) Gets all waypoint groups for the specified player.getGlobalGroup(String guid) Gets the global waypoint group with the given GUID.getGlobalWaypoint(String guid) Gets the global waypoint with the given GUID.Gets all waypoints that are not tied to specific players.Gets the waypoint group with the given GUID for the specified player.Returns the server-side overlay API, used to push polygon overlays to connected players' JourneyMap clients.getWaypoint(UUID playerUUID, String guid) Gets the waypoint with the given GUID for the specified player.Gets all waypoints stored on the server for all players and all global waypoints.getWaypoints(UUID playerUUID) Gets all waypoints stored for the player with the given UUID.getWaypoints(net.minecraft.server.level.ServerPlayer player) Gets all waypoints stored for the given server player.voidshareWaypoint(Waypoint waypoint, UUID fromUUID, String fromName, List<UUID> targetIds, boolean allKnownUsers) Programmatically share a waypoint with one or more players.
-
Method Details
-
getWaypoints
Gets all waypoints stored for the given server player.- Parameters:
player- the server player- Returns:
- the player's waypoints
-
getWaypoints
Gets all waypoints stored for the player with the given UUID.- Parameters:
playerUUID- the player UUID- Returns:
- the player's waypoints
-
getWaypoints
Gets all waypoints stored on the server for all players and all global waypoints.- Returns:
- all waypoints
-
getWaypoint
Gets the waypoint with the given GUID for the specified player.- Parameters:
playerUUID- the player UUIDguid- the waypoint GUID- Returns:
- the waypoint, or null if not found
-
getAllGroups
Gets all waypoint groups for the specified player.- Parameters:
playerUUID- the player UUID- Returns:
- the player's waypoint groups
-
getGroup
Gets the waypoint group with the given GUID for the specified player.- Parameters:
playerUUID- the player UUIDguid- the group GUID- Returns:
- the group, or null if not found
-
addPlayerWaypoint
Adds or updates a waypoint for the specified player. FiresWaypointEvent(CREATE or UPDATE, cancellable).- Parameters:
playerUUID- the player UUIDwaypoint- the waypoint to add or update
-
deletePlayerWaypoint
Deletes the waypoint with the given GUID for the specified player. FiresWaypointEvent(DELETED).- Parameters:
playerUUID- the player UUIDguid- the waypoint GUID to delete
-
addPlayerGroup
Adds or updates a waypoint group for the specified player.- Parameters:
playerUUID- the player UUIDgroup- the group to add or update
-
deletePlayerGroup
Deletes the waypoint group with the given GUID for the specified player.- Parameters:
playerUUID- the player UUIDguid- the group GUID to deletedeleteWaypoints- if true, also deletes all waypoints belonging to the group
-
getGlobalWaypoints
Gets all waypoints that are not tied to specific players. These waypoints are visible to every player when they log in.- Returns:
- all global waypoints
-
getGlobalWaypoint
Gets the global waypoint with the given GUID.- Parameters:
guid- the waypoint GUID- Returns:
- the waypoint, or null if not found
-
getAllGlobalGroups
List<WaypointGroup> getAllGlobalGroups()Gets all global waypoint groups.- Returns:
- all global waypoint groups
-
getGlobalGroup
Gets the global waypoint group with the given GUID.- Parameters:
guid- the group GUID- Returns:
- the group, or null if not found
-
addGlobalWaypoint
Adds or updates a global waypoint. FiresGlobalWaypointEvent(CREATE or UPDATE, cancellable).- Parameters:
waypoint- the waypoint to add or update
-
deleteGlobalWaypoint
Deletes the global waypoint with the given GUID. FiresGlobalWaypointEvent(DELETED).- Parameters:
guid- the waypoint GUID to delete
-
addGlobalGroup
Adds or updates a global waypoint group. FiresGlobalWaypointGroupEvent(CREATE or UPDATE, cancellable).- Parameters:
group- the group to add or update
-
deleteGlobalGroup
Deletes the global waypoint group with the given GUID. FiresGlobalWaypointGroupEvent(DELETED).- Parameters:
guid- the group GUID to deletedeleteWaypoints- if true, also deletes all waypoints belonging to the group
-
getOverlayApi
IServerOverlayAPI getOverlayApi()Returns the server-side overlay API, used to push polygon overlays to connected players' JourneyMap clients.- Returns:
- the overlay API
-