GPS [1.9 - 1.21] | Global Positioning System For Your Server | icon

GPS [1.9 - 1.21] | Global Positioning System For Your Server | -----

An actual GPS featuring 360° 3D axis arrows, in-game configurator, and advanced path computation!



[​IMG]
The one and only first ever actual Global Positioning System; GPS for short for Spigot servers. Designed with both simple and advanced world mappings in mind. Create simple GPS mappings or very complex and advanced webs of connections and routes. The GPS will consistently guide you through the shortest path available.


Warping around the world/spawn is ordinary and extremely boring. It leaves everything you have built unwatched and unappreciated resulting in wasted time / wasted money spent on builders and makes your server dull. Using the GPS allows your players to explore your server as they go, and discover all the characteristics that make your server unique and intriguing. Guided by a completely customizable arrow, which is not created from boring particles, you, and your players, always know exactly where to go. Setting up the GPS is extremely easy and straightforward. With the in-game GPS configurator, you are free from messing around with clumsy yml files and having to fiddle around with misconfigurations due to typos and indentation errors. All points and connections are observable via particles whenever the configurator is enabled.

Test Server: 66.70.238.175:25596

If you wish to use this on a 1.8 server then please read the "Important for 1.8 servers" in the Versions and Support section first!

[​IMG][​IMG]


[​IMG]
The GPS Arrow:
  • Appearance:[​IMG]
    The arrow is created from any placeable block. Above is a few examples of that. The length, arrowhead size, and density of blocks, etc. are all 100% configurable in the config.yml file. You can also set the header of the arrow.

    Below are a few examples of different arrow settings. The default arrow is the one to the left. Remember; larger sizes and higher densities require more entities which require more server resources. (The default is created from just 15 entities)

    You can also use a custom resource pack or particles. Take a look further down.
    [​IMG]
  • Behaviour and physical properties:
    The arrow can rotate and point in any direction. The direction is based on your current position and the direction towards the destination. The arrows direction is based on your location, not its own location.
    [​IMG]

    Notice how the arrow 'staircases' at an angle and has a flat head when pointing up/down.
    [​IMG]
    The arrow will follow you around in a fixed position based on the direction you are looking and moves in a seamless and smooth manner. As seen in the gif above the arrow changes its direction instantaneously without any stuttering.
  • Invisibility:
    Since the arrow is made from entities and not Particles, hiding it is a whole lot harder. This has been made possible with the use of ProtocolLib. If you wish to hide the arrow you will have to have PL installed on your server. Enable/disable this feature in the config.yml file.

    The example below illustrates the perfectly hidden arrow. The player on the left can clearly see his GPS arrow, though it remains undetectable/invisible for the player on the right.
    [​IMG]
  • Invincibility:
    Using the kill command won't delete the arrow. This ensures that plugins like entity cleaners won't delete the GPS arrows and cause issues.
    [​IMG]
  • Moveability:
    The arrow can be moved to best suit the players needs. The move-mode is enabled via the /gps move command. In this mode, the scroll wheel on your mouse functions as the "control stick". Use the scroll wheel to move the arrow forwards and backward. Hold shift and use the scroll wheel to move the arrow up and down.
    [​IMG]
  • Other arrow types:
    You can also choose to use a custom resource pack for your arrow:
    [​IMG]
    Click to view the photo album.

    Resource pack link:
    The three arrows above is created by @NullBlox. Feel free to use them.
    1.8 - 1.12 download
    1.13+ download

    The material for the three default arrows is IRON_HOE and the durability is 1,2, and 3.

    ( The name is set to '' but also works for resource pack arrows)
    [​IMG]

    A particle variation of the arrow is also available.
    A simple version and a 3D version:
    [​IMG]
    [​IMG]
Navigation behavior:
  • Path computation:
    Below is an example of a small rather complex GPS setup. The image illustrates the effectiveness of the computation algorithm. Even in a web of points and connections, the GPS will find the absolute shortest path possible; instantaneously. To ensure performance, paths are temporarily stored for as long as the player has the GPS active. This makes the GPS extremely responsive and allows it to update lightning fast without putting any strain on the server.[​IMG][​IMG]The video has been sped up to x2.
  • Path recomputation:
    The GPS logic allows for players to veer off course or take alternate routes. If they should decide to do so, the GPS will update to the new shortest path as soon as they get in range of another point; as seen in the video below.
    [​IMG]
    N.B. The particle paths are only shown for the player being navigated if they have it turned on. The particles are only visible for the "camera" for the purpose of this GIF.
  • Single direction connections:
    The setup below demonstrates a single-direction connection setup. This can be used in any way you want. It is useful for making sure the player is not navigated through an "impossible" path e.g. the player is unable to jump to the next point in the picture below, yet they are able to "jump" down. (Red boxes are points, blue lines are connections, light blue particles equals connected)
    [​IMG]
    The GIF below demonstrates the usage. Even though the player is closer to the center point, he is being navigated through the other points.
    [​IMG]
  • World Linking
    You can even connect your points across worlds! Simply select a point in one world, teleport to another world, and connect them. The GPS will compute the shortest path even if the destination is in another world! When teleporting to another point with the GPS active the destination has to be within the range of a point and you have to be able to reach the end-destination from that point.
    [​IMG]
    Above is a short example of teleporting between two worlds to get past an "obstacle".
Particles & other mechanics:
  • Path visualization:
    Alongside the arrow navigation, you can also enable a visualization of the current chosen path. The particles are shown only for the player being navigated. As of 1.6.0, it is possible to disable the arrow completely and solely use the particle path instead.
    [​IMG]
  • In-game configurator:
    The plugin also features an easy-to-use complex in-game GPS configurator. The commands and how to use it is explained in the commands section.
    Using the command /gpsc show enables the particle visualization. Each connection is shown with a blue particle line, two light blue particles at the end of the line indicate the points are connected. Each point is represented with a red particle box by default. Your currently selected box is green and the closest box to you is yellow.

    The in-game configurator allows you to create, delete, connect, disconnect, and move points without ever having to deal with a yml file. The configurator is very easy to use and you'll get your world mapped in no time.
    [​IMG]

    Apart from using commands to set up your GPS, you can also use the built-in GPS Configurator Stick which allows you to create, select, connect, disconnect, and delete points with a single click.
    [​IMG]
  • Vehicle plugin support:
    The GPS supports all vehicle/movement plugins. This is made possible by updating the GPS based on the player's location at a fixed interval. This has been thoroughly tested and will 100% work for any movement not involving player teleportation above 20 blocks.
  • Dynmap Support:
    The GPS plugin allows you to showcase your GPS setup with Dynmap. Below is an example of the setup used on my Test Server:​
    [​IMG]
    [​IMG]
  • BossBar Compass:
    [​IMG]
The plugin has a lot of features; these were merely the main features. Please take a look at the commands, config.yml, and messages.yml which will reveal more of the features available.

[​IMG]
[​IMG] [​IMG]

[​IMG]
/GPS:
All commands below require the gps.commands permission alongside the individual command permission. The main command is /globalpositioningsystem, however, /gps is a more convenient alias.

  • /gps [help]
    Alias: [h]
    Opens the help menu. The help menu is clickable and contains hover messages with instructions.
    Permission:
    • gps.commands.help
  • /gps [start] <to> [from] [player]
    Alias: [s ]
    Start the GPS.
    A destination parameter is required. The from parameter specifies a starting point; it is optional. The player parameter is used to start the GPS for another player e.g. through the console.
    Permissions:
    • gps.commands.start (Required)
    • gps.commands.others (For using on other players)
  • /gps stop [player]
    Stop the GPS / stop the GPS for another player.
    Permissions:
    • gps.commands.stop (Required)
    • gps.commands.others (For using on other players)
  • /gps toggle
    Aliases: [tog, t]
    Toggle GPS usage. When toggled off nothing can start the GPS for you.
    Permission:
    • gps.commands.toggle
  • /gps move
    Alias: [m]
    Enable the arrow manipulation feature. This allows you to move the arrow both vertically and horizontally. (Seen in the features above)
    Permissions:
    • gps.commands.move
  • /gps show
    Alias: [sh]
    Show your current path with particles.
    Permission:
    • gps.commands.show
  • /gps list [page]
    Alias: [l]
    Shows a list of all defined points, including points added by plugins using the API. All points have a hover message containing the location and connections of the point.
    Permission:
    • gps.commands.list
    • Sub permission:
      If a player has the gps.commands.configurator permission all points in the list are clickable and will teleport you to the location of the point clicked.
/Compass:
Aliases: [compas, comp, com]
All commands below require the gps.commands permission alongside the individual command permission. The compass commands share permissions with the GPS commands. The main usage for the compass is simply pointing the player directly towards a point. The compass can be started from anywhere.

  • /compass [help]
    Alias: [h]
    Opens the help menu. The help menu is clickable and contains hover messages with instructions.
    Permission:
    • gps.commands.help
  • /compass [start] <to> [player]
    Alias: [s ]
    Start the compass.
    The destination parameter is required and can be any valid point. The player parameter is used to start the Compass for another player e.g. through the console.
    Permissions:
    • gps.commands.start (Required)
    • gps.commands.others (For using on other players)
  • /compass [start] <x> <y> <z> [player]
    Alias: [s ]
    Start the compass.
    The x, y, and z parameters represent the coordinates of a location in the world the player is currently in. The player parameter is used to start the Compass for another player e.g. through the console.
    Permissions:
    • gps.commands.start (Required)
    • gps.commands.others (For using on other players)
  • /compass stop [player]
    Stop the compass / stop the compass for another player.
    Permissions:
    • gps.commands.stop (Required)
    • gps.commands.others (For using on other players)
  • /compass toggle
    Aliases: [tog, t]
    Toggle compass usage. When toggled off nothing can start the compass for you.
    Permission:
    • gps.commands.toggle
  • /compass show
    Alias: [sh]
    Show your current compass direction with particles.
    Permission:
    • gps.commands.show
/GPSConfigurator:
Aliases: [gpsconfig, gpsconf, gpscon, gpsc]
All commands below share the same permission: gps.commands.configurator

  • /gpsc [help]
    Alias: [h]
    Opens the help menu. The help menu is clickable and contains hover messages with instructions.
  • /gpsc editor
    Aliases: [edit, e]
    Enable the editor features. This command is a safety for unintentional command configurations. The editor command will also enable the configuration particle visualizer.
  • /gpsc stick
    Aliases: [st, getStick, cfgStick]
    Adds a Configurator Stick to your inventory.
    To operate the stick you also need the gps.commands.configurator permission. If a regular player were to get a hold of one these they would not be able to mess anything up.
  • /gpsc create <name>
    Alias: [c]
    Create a new GPS point.
  • /gpsc delete
    Aliases: [del, d]
    Delete your selected GPS point.
  • /gpsc select
    Aliases: [sel, s]
    Select the point closest to you.
  • /gpsc info
    Aliases: [i ]
    Shows info about the point closest to you.
  • /gpsc connect [2-way]
    Alias: [con]
    Connect your selected point to the one closest to you. 2-way allows you to chose whether or not both points should be connected to each other. Setting this parameter to false will only connect the selected point to the closest, and not both ways. Both points are connected if the 2-way parameter hasn't been specified.
  • /gpsc disconnect
    Aliases: [disc, dis]
    Disconnect your selected point and closest point from each other.
  • /gpsc move
    Alias: [m]
    Move the selected point to your current location. (The location at your feet)
  • /gpsc attribute <attribute> [value...]
    Aliases: [att, ab, a]
    Set an attribute on your selected point. Available attributes can be viewed by hovering over the command in the /gpsc help message. Leave the value parameter empty to delete the attribute and use the default if any.
/GPSAdmin:
Aliases: [gpsad, gpsa]
All commands below share the same permission: gps.commands.admin

  • /gpsa [help]
    Alias: [h]
    Opens the help menu. The help menu is clickable and contains hover messages with instructions.
  • /gpsa active [page]
    Aliases: [act, a]
    Shows a list of all currently active GPSes/Compasses. Each list entry has a hover message containing information about the status of the player's GPS. You can click on an entry to stop the GPS for that player.
  • /gpsa stop
    Aliases: [st, s]
    Stop all active GPSes and Compasses.
  • /gpsa toggleusage
    Aliases: [toggleu, tusage, tu]
    Toggles whether GPSes and Compasses can be started. If toggled to disabled all active GPSes and compasses are stopped as well. This command can be useful when you're making changes to your GPS setup to.
  • /gpsa info
    Alias: [inf, i]
    Displays version info and offers quick links for new versions and support.
  • /gpsa cleanup
    Aliases: [cleanu, cup, cu]
    Removes leftover GPS arrows. This can happen in rare cases.
  • /gpsa reload
    Alias: [r]
    Reload the GPS configuration files.
Tab Completion:
GPS features a smart permission based tab completer. It will suggestion commands and parameters based on the players' permissions.
[​IMG]


Other permissions:
  • gps.update
    This permission will allow non-OPs to be notified of a new update.
  • gps.hunger.ignore
    Players with this permission will not lose hunger when using the GPS or Compass.
  • gps.startonrespawn
    The compass will start for players' with this permission when they respawn targetting their death location.
[​IMG]
Code (YAML):
############################################################
# +------------------------------------------------------+ #
# |                  ____  ____   ____                   | #
# |                 / ___||  _ \ / ___|                  | #
# |                | |  _ | |_) |\___ \                  | #
# |                | |_| ||  __/  ___) |                 | #
# |                 \____||_|    |____/                  | #
# |                                                      | #
# | By: Benz56                                           | #
# +------------------------------------------------------+ #
############################################################


############################################################
# +------------------------------------------------------+ #
# |              Arrow appearance settings               | #
# +------------------------------------------------------+ #
############################################################

# The block the arrow is made out of. Data values are supported.
# Implementation: Block or 'Block:Data'.
block
: Quartz_Block

# The Block density / the spacing between each block in the arrow.
arrowDensity
: 0.3

# Set the length of the arrow shaft.
arrowLength
: 2.1

# Set the length of the arrow head parts.
headLength
: 0.9

# Set the offset of the arrow head parts.
# Used for fine tuning the look of the arrow head at different sizes if necessary.
headOffset
: 0.3

# Name of the arrow.
# Use %distance% as a placeholder for the remaining distance to the target.
# Use %distanceRounded% as a placeholder for the remaining rounded distance to the target.
arrowName
: '&a %distance% blocks to destination'

# Display the arrows name on the action bar instead of above the arrow.
useActionbar
: false


############################################################
# +------------------------------------------------------+ #
# |               Arrow position settings                | #
# +------------------------------------------------------+ #
############################################################

# Set the default horizontal and vertical offset distance from the player.
defaultHorizontalOffset
: 6.0
defaultVerticalOffset
: 2.5

# Set the min and max offset values for the horizontal and vertical offsets.
# These values are the min/max values for the /gps move command.
minHorizontalOffset
: 3.0
maxHorizontalOffset
: 10.0
minVerticalOffset
: -2.0
maxVerticalOffset
: 6.0



############################################################
# +------------------------------------------------------+ #
# |             Particle appearance settings             | #
# +------------------------------------------------------+ #
############################################################

# Set the density of the particles / the spacing between each particle in the line.
particleDensity
: 1.0

# Set the render distance of the particles.
particleRenderDistance
: 40.0

# Set the particle update rate. (update every x ticks)
particleUpdateRate
: 5


# Set different colors for particles below.
# The particles use RGB color values. Use the link below:
# - https://www.w3schools.com/colors/colors_rgb.asp

# The base line color.
lineColor
: 1, 1, 255

# The connected line color. If A is connected to B
# the two last particles at point B will be in the color below.
connectedColor
: 1, 255, 255

# Default point highlight color. If the location is not
# the selected nor the closest this color is used.
defaultPointColor
: 255, 1, 1

# Selected point highlight color. If the location is
# the selected point this color is used.
selectedPointColor
: 1, 255, 1

# Closest point highlight color. If the location is
# the closest point this color is used.
closestPointColor
: 255, 255, 1



############################################################
# +------------------------------------------------------+ #
# |                     GPS settings                     | #
# +------------------------------------------------------+ #
############################################################

# Max distance to entry point if a start/from parameter has not been specified.
# If the distance is greater than the value below the GPS won't start.
maxDistanceToEntry
: 50.0

# Point update distance. The distance is the radius of a spherical check around
# the point, meaning it does not matter which direction the player is coming from.
pointUpdateDistance
: 5.0

# GPS update interval. The interval in which the GPS updates to check if the player
# reached a new point. Setting this to 1 allows the GPS to be very responsive but
# takes up more system resources. Setting it too high will make the GPS unresponsive
# and possibly miss new points if the player is moving fast e.g. on a horse or flying.
# The sweetspot is between 2 and 5.
gpsUpdateInterval
: 3



############################################################
# +------------------------------------------------------+ #
# |                    Other Settings                    | #
# +------------------------------------------------------+ #
############################################################

# Set the max distance for point selection and closest point update.
selectionDistance
: 10.0

# Only show the GPS arrow for the owner.
# This setting requires you to have ProtocolLib installed on your server!
# If set to true and ProtocolLib is not installed it will fail silently and show for all.
showForOwnerOnly
: true

# Particle path mode.
# This mode disables the arrow completely and instead activates the
# particle path whenever the GPS start method is called. The /gps show
# command will behave as the /gps stop command as well. Furthermore,
# it will enable Actionbar mode regardless of the setting chosen earlier.
# If you do not wish to show an Actionbar message set the arrowName to ''.
disableArrow
: false
Code (YAML):
#######################################################################################
# +---------------------------------------------------------------------------------+ #
# |    ____                                            _   _                _       | #
# |   |  _ \  _   _  _ __   _ __ ___    __ _  _ __    | | | |  ___    ___  | | __   | #
# |   | | | || | | || '_ \ | '_ ` _ \  / _` || '_ \   | |_| | / _ \  / _ \ | |/ /   | #
# |   | |_| || |_| || | | || | | | | || (_| || |_) |  |  _  || (_) || (_) ||   <    | #
# |   |____/  \__, ||_| |_||_| |_| |_| \__,_|| .__/   |_| |_| \___/  \___/ |_|\_\   | #
# |           |___/                          |_|                                    | #
# |                                                                                 | #
# +---------------------------------------------------------------------------------+ #
#######################################################################################

# Enable or Disable the Dynmap GPS.
enabled
: false

# Name of Marker Set.
name
: 'GPS'


############################################################
# +------------------------------------------------------+ #
# |                    Point settings                    | #
# +------------------------------------------------------+ #
############################################################

# Enable disable the circular point markers.
pointMarkersEnabled
: true

# Radius. Set the radius to 0 to use the update distance as the radius.
pointRadius
: 0

# Set the fill style. Color is in RGB.
pointFillOpacity
: 0.2
pointFillColor
: 85, 85, 255

# Set the border style. Color is in RGB.
pointBorderWeight
: 2
pointBorderOpacity
: 0.7
pointBorderColor
: 255, 0, 0

# Set the clickable popup description on each point.
# The description is written in HTML Markup.
pointDescription
:
 - '<h2>Point
: %point%</h2>'
 - '<b>Location:</b> %location%<hr>'
 - '<b>Connections:</b>'
 - ' %connectionList%'

# Set how lines in the connection list appears.
connectionListLine
: '<i> %connection%</i>'


############################################################
# +------------------------------------------------------+ #
# |                 Connection settings                  | #
# +------------------------------------------------------+ #
############################################################

# Enable disable the connection line markers between the point markers.
connectionMarkersEnabled
: true

# Set the connection line style. Color is in RGB.
connectionLineWeight
: 4
connectionLineOpacity
: 0.4
connectionLineColor
: 85, 255, 255
Code (YAML):
# This is the Message file for all GPS messages.
#
# All messages are fully customizable and support color codes, formatting and ASCII symbols.
# Set the Prefix/ConfPrefix and use %prefix%/%confPrefix% to add the corresponding prefix to a message.
# Leave a message blank ('') to disable it.


Prefix
: '&7 [&eGPS&7 ]'
ConfPrefix
: '&7 [&eGPS Configurator&7 ]'
Messages
:
  General
:
    invalidPermission
: ' %prefix% &cYou do not have permission to do this!'
    noCommands
: Unknown command. Type "/help" for help.
    unknownCommand
: ' %prefix% &cUnknown command!'
    unknownPlayer
: ' %prefix% &cUnknown Player!'
    configurationsReloaded
: ' %prefix% &aConfiguration files successfully reloaded!'
    playerOnly
: ' %prefix% &cCommand can only be used as a Player!'
  GPS
:
    invalidArgs
: ' %prefix% &cInvalid arguments!'
    unknownPoint
: ' %prefix% &cUnknown Point!'
    started
: ' %prefix% &aGPS started!'
    startedPlayer
: ' %prefix% &aGPS started for %player%!'
    stopped
: ' %prefix% &aGPS stopped!'
    stoppedPlayer
: ' %prefix% &aGPS stopped for %player%!'
    notStarted
: ' %prefix% &cGPS is not active!'
    moveModeEnabled
: ' %prefix% &aEnabled move mode. Use again to disable.'
    moveModeDisabled
: ' %prefix% &aDisabled move mode.'
    noPath
: ' %prefix% &cNo valid path.'
    noEntry
: ' %prefix% &cNo entry point nearby!'
    destinationReached
: ' %prefix% &aDestination reached!'
    cantReachDestination
: ' %prefix% &cCannot reach destination from here!'
    pluginReload
: ' %prefix% &cThe GPS has been reloaded! Exiting navigation.'
    arrowDisabled
: ' %prefix% &cThe GPS arrow is disabled. Move mode unavailable.'
  Configurator
:
    playerOnlyConf
: ' %confPrefix% &cGPS Configurator commands are for in-game configuration only!'
    toggleEditor
: ' %confPrefix% &aEditor %state%'
    editorInactive
: ' %confPrefix% &cEditor not active!'
    invalidArgsConf
: ' %confPrefix% &cInvalid arguments!'
    pointExists
: ' %confPrefix% &cPoint already exists!'
    nonexistentPoint
: ' %confPrefix% &cPoint does not exist!'
    pointCreated
: ' %confPrefix% &aPoint successfully created!'
    pointDeleted
: ' %confPrefix% &aPoint successfully deleted!'
    noPointsNearby
: ' %confPrefix% &cNo points nearby!'
    noPointSelected
: ' %confPrefix% &cNo point selected!'
    selectedPoint
: ' %confPrefix% &aSelected point: &e%selected%'
    cantConnectSame
: ' %confPrefix% &cCan''t connect the same point!'
    cantConnectDimension
: ' %confPrefix% &cCan''t connect points between dimensions!'
    connectedPoint
: ' %confPrefix% &aSuccessfully connected &e%selected% &ato &e%closest%!'
    alreadyConnected
: ' %confPrefix% &cPoints are already connected!'
    cantDisconnectSame
: ' %confPrefix% &cCan''t disconnect the same point!'
    disconnectedPoint
: ' %confPrefix% &aSuccessfully disconnected &e%selected% &afrom &e%closest%'
    notConnected
: ' %confPrefix% &cPoints are not connected!'
    otherWorld
: ' %confPrefix% &cCan''t move point to another world!'
    movedPoint
: ' %confPrefix% &aSuccessfully moved point!'
    locationsHasPoint
: ' %confPrefix% &cThis location already contains a point!'
    invalidPoint
: ' %confPrefix% &cInvalid Point: %point%!'
    teleportedToPoint
: ' %confPrefix% &aSuccessfully teleported.'
    noPointInEyeSight
: ' %confPrefix% &cNo point in eyesight.'
    addedStick
: ' %confPrefix% &aA Configurator Stick has been added to your inventory.'
Code (YAML):
# This file stores all the GPS Points/Locations.
#
# It is advised that you use the in-game configurator when editing your setup.
# The in-game configurator lets you visually see what you are changing and avoids typing/input errors.


Points
:
  world, 0, 60, 0
:
    name
: Test
    connections
:
    - world, 10, 65, 10
  world, 10, 65, 10
:
    name
: Test2
    connections
:
    - world, 0, 60, 0
Some files might contain more options due to new updates.


[​IMG]
1. Purchase and Download GPS.
2. Drag and drop the plugin to your plugins folder.
3. Start, restart, or reload your server.


The plugin is now ready to be configured. Follow the steps below to get started setting up the GPS.

1. Use the following commands to enable the editor and particle visualization: /gpsc editor & /gpsc show.

2. Go to a location where you would like to set a GPS point e.g. a shop.

3. Execute /gpsc create shop. (Or replace "shop" with any other name) Now you have successfully created your first point.

4. Go to another location and create a point the same way you did in the previous step.

5. Optional. Create points between the two other points to make the GPS path follow a certain route.

6. Use the /gpsc select command on one of your points. The point will change color to green. Go to the next point which will turn yellow as you get close enough. Use the /gpsc connect command to connect the two points.

7. Select this point and continue connecting all of your points.

8. When you are happy with your point and connections you can start using the GPS. You can always add more points, delete points, add/remove connections, move points etc. as you go.

If you have further questions regarding setting the GPS up; please send me a private message.


[​IMG]
As of version 1.2.0, an application programming interface has been added for developers to use. With this API you, the developer, can add points, connections, disconnect points, remove points, as well as start and stop the GPS for players.


Below is an example of getting an instance of the API as well as adding and connecting a few custom points:
Code (Java):
package com.live.bemmamin.example ;

import com.live.bemmamin.gps.api.GPSAPI ;
import org.bukkit.Bukkit ;
import org.bukkit.Location ;
import org.bukkit.plugin.java.JavaPlugin ;

public class Main extends JavaPlugin {

    private GPSAPI gpsapi = null ;

    @Override
    public void onEnable ( ) {
        if (Bukkit. getPluginManager ( ). getPlugin ( "GPS" ). isEnabled ( ) ) {
            gpsapi = new GPSAPI ( this ) ;

            initialiseCustomPoints ( ) ; //Just an example.

            gpsapi. startGPS (Bukkit. getPlayer ( "Benz56" ), "pluginName6" ) ;
        }
    }

    private void initialiseCustomPoints ( ) {
        gpsapi. addPoint ( "pluginName1", new Location (Bukkit. getWorld ( "world" ), 91, 60, 81 ) ) ;
        gpsapi. addPoint ( "pluginName2", new Location (Bukkit. getWorld ( "world" ), 76, 60, 85 ) ) ;
        gpsapi. addPoint ( "pluginName3", new Location (Bukkit. getWorld ( "world" ), 83, 60, 77 ) ) ;
        gpsapi. addPoint ( "pluginName4", new Location (Bukkit. getWorld ( "world" ), 74, 60, 73 ) ) ;
        gpsapi. addPoint ( "pluginName5", new Location (Bukkit. getWorld ( "world" ), 86, 60, 67 ) ) ;
        gpsapi. addPoint ( "pluginName6", new Location (Bukkit. getWorld ( "world" ), 84, 60, 61 ) ) ;

        gpsapi. connect ( "pluginName1", "pluginName2", true ) ;
        gpsapi. connect ( "pluginName1", "pluginName3", false ) ;
        gpsapi. connect ( "pluginName2", "pluginName3", true ) ;
        gpsapi. connect ( "pluginName3", "pluginName4", true ) ;
        gpsapi. connect ( "pluginName4", "pluginName5", true ) ;
        gpsapi. connect ( "pluginName5", "pluginName6", true ) ;
    }

    @Override
    public void onDisable ( ) {
        gpsapi. removeAllPoints ( ) ;
    }
}
Code (Java):
//Start the GPS for a player with a set destination and the closest point as the starting point.
void startGPS (Player player, String destination ) ;

//Start the GPS for a player with a starting and destination point. (The starting point will change if another point is closer)
void startGPS (Player player, String start, String destination ) ;

//Previous two but with a custom start message.
void startGPS ( String customStartMessage, Player player, String destination ) ;
void startGPS ( String customStartMessage, Player player, String start, String destination ) ;

//Start the Compass for a player with a set destination.
void startCompass (Player player, String destination ) ;

//Start the Compass for a player with a set location as the destination.
void startCompass (Player player, Location location ) ;

//Previous two but with a custom start message.
void startCompass ( String customStartMessage, Player player, String destination ) ;
void startCompass ( String customStartMessage, Player player, Location location ) ;

//Stop the GPS for a player.
void stopGPS (Player player ) ;

//Check whether or not the GPS is active for a specific player.
boolean gpsIsActive (Player player ) ;

//Add a custom point. Make sure the name is unique. E.g. add your plugin name as the first part of the name.
void addPoint ( String name, Location location ) ;

//Remove a point you personally added.
void removePoint ( String name ) ;

//Remove all points you added.
void removeAllPoints ( ) ;

//Connect point1 to point2. If the 'both[I]'[/I] parameter is true; point2 is also connected to point1.
void connect ( String point1, String point2, boolean both ) ;

//See connect.
void disconnect ( String point1, String point2, boolean both ) ;

//Return the remaining GPS distance. E.g: 145,32 or 1.593,23.
String getDistanceToTarget (Player player ) ;

//Return the remaining GPS distance rounded. E.g: 145 or 1.593.
String getDistanceToTargetRounded (Player player ) ;

//Return the cardinal direction a player has to go. (N, NE, E, SE, S, SW, W, NW)
String getCardinalDirection (Player player ) ;

//Get all of the locally configured points from the points.yml file.
List <Point > getConfigurationPoints ( ) ;

//Get all local points including externally added points from plugins using the API on the server.
List <Point > getAllPoints ( ) ;

//Get all points added by the plugin with the given name.
List <Point > getPluginPoints ( String pluginName ) ;

//Get the closest point to a given location selected from the list of locally configured points.
void getClosestConfigurationPoint (Location location, Consumer <Point > consumer ) ;

//Get the closest point to a given players location selected from the list of locally configured points.
void getClosestConfigurationPoint (Player player, Consumer <Point > consumer ) ;

//Get the closest point to a given location selected from the list of locally and externally configured points.
void getClosestGlobalPoint (Location location, Consumer <Point > consumer ) ;

//Get the closest point to a given players location selected from the list of locally and externally configured points.
void getClosestGlobalPoint (Player player, Consumer <Point > consumer ) ;
GPS start event:
Code (Java):
@EventHandler
public void onGPSStart (GPSStartEvent e ) {
    //Get the player the GPS is being started for.
    e. getPlayer ( ) ;

    //Get the destination point. This Object contains the Location as well.
    e. getDestinationPoint ( ) ;

    //Get the StartSource / what started the GPS.
    //Enums: PLAYER_SELF, PLAYER_OTHER, CONSOLE, OTHER_PLUGIN
    e. getStartSource ( ) ;

    //The navigation type is of type compass (true) or GPS (false)
    e. isCompass ( ) ;

    //Check if the event is cancelled.
    e. isCancelled ( ) ;

    //Cancel the event based on your checks.
    e. setCancelled ( boolean cancel ) ;
}
GPS stop event:
Code (Java):
@EventHandler
public void onGPSStop (GPSStopEvent e ) {
    //Get the player the GPS is being started for.
    e. getPlayer ( ) ;
 
    //Get the StopSource / what caused the GPS to stop.
    //Enums: PLAYER_SELF, PLAYER_OTHER, CONSOLE, PLUGIN, OTHER_PLUGIN, DESTINATION_REACHED
    e. getStopSource ( ) ;

    //The navigation type is of type compass (true) or GPS (false)
    e. isCompass ( ) ;

    //Send a custom stop message when the GPS/compass is stopped.
    e. setCustomStopMessage ( String customStopMessage ) ;

    //Check if the event is cancelled.
    e. isCancelled ( ) ;

    //Cancel the event based on your checks. StopSource DESTINATION_REACHED and PLUGIN is not cancellable.
    e. setCancelled ( boolean cancel ) ;
}


[​IMG]
Versions 1.9 - 1.18 are fully supported. All features are supported in all of those versions; no exceptions.


Protocol hacks are supported such as viaversion and viabackwards though 1.8.x clients are not able to correctly render compact entities which the arrow consists of.
The screenshot is taken on a 1.12.2 server with viabackwards. The two clients are looking at the exact same arrow at the exact same time, though the 1.8.8 client is having some issues correctly displaying the arrow.
[​IMG]

Tested versions:
1.8, 1.9, 1.10, 1.11.2, 1.12, 1.12.2, 1.13, 1.14.4, 1.15, 1.15.1, 1.15.2, 1.16.1, 1.17.1, 1.18.1, 1.18.2, 1.19, 1.20, 1.21


Important for 1.8 servers:
As mentioned above the entity arrow is not rendered correctly by a 1.8 client which also means that if you run a 1.8 server you are not able to use it. However, the Particle arrow works just fine on 1.8 servers. That is the only difference regarding 1.8 and non-1.8 servers. Everything else is supported.


Dynmap Support:
The plugin supports dynmap as well. Check out the configuration file above to check out the features that are provided with dynmap.


Recommended version: https://github.com/elBukkit/dynmap/releases/tag/3.0-Circle-Fix


PlaceholderAPI Support:
The following placeholders are available through placeholderAPI:

  • %gps_distance%
    This placeholder will return the remaining GPS distance.
    E.g: 145,32 or 1.593,23.
  • %gps_distanceRounded%
    This placeholder will return the remaining GPS distance rounded.
    E.g: 145 or 1.593.
  • %gps_cardinalDirection%
    This placeholder will return the cardinal direction a player has to go. (N, NE, E, SE, S, SW, W, NW)
Supported/tested server types:
Spigot.



Servers using this plugin:
Official Testserver: 142.44.222.241:25602
Secondary test server: PowerPlugins.net
CoolWill: mc.coolwill.info
Kubos: play.kubosmc.uk


[​IMG]
By purchasing GPS you agree to the following Terms of Service:

  • The resource is not obfuscated. You may decompile and take a look at the code once purchased, however, you may not distribute the code.
  • You are not allowed to file a chargeback or PayPal dispute.
  • You are not allowed to use the plugin on more than one server/network.
  • You are not allowed to redistribute the plugin under any circumstances.
  • You must have read the entire description on this page before purchasing.
  • Posting bad reviews based on bugs, missing features, or similar before contacting me personally results in the immediate revocation of your access.
  • I reserve the right to change these terms at any time and you agree to abide by the most recent version of the terms.
  • I retain the right to revoke your access to GPS if you violate any terms above.

[​IMG]
Resource Information
Author:
----------
Total Downloads: 996
First Release: Mar 4, 2018
Last Update: Dec 17, 2024
Category: ---------------
All-Time Rating:
41 ratings
Version -----
Released: --------------------
Downloads: ------
Version Rating:
----------------------
-- ratings