Skip to main content
← All Guides
Plugin Development · 5 min read

How to Make a Player Tracker Plugin with Skript

Build a working player tracker compass plugin in Minecraft using Skript. Covers compass targeting, distance display, action bar updates and tracking permissions.

What Is a Player Tracker?

A player tracker is a compass-based system that points toward a target player's location and shows the distance between you and them. It is one of the most popular custom features on PvP, manhunt, and survival servers. You have probably seen it in Minecraft manhunt videos, the hunter holds a compass that always points at the speedrunner. Building a skript player tracker minecraft plugin is a great intermediate project that teaches variables, scheduled tasks, and action bar messaging.

This guide uses Skript 2.9+ on Paper 1.21+. If you have not installed Skript yet, follow our Minecraft Skript Tutorial first.

Core Concept

The tracker works by repeatedly setting the compass target of one player to the location of another player. Minecraft compasses already point toward a location, we just override that location every tick or every second to keep it updated. Combined with an action bar message showing distance, the result feels like a polished custom plugin.

The Tracking Command

Start by creating the command that lets a player select who to track:

command /track <player>:
    permission: tracker.use
    cooldown: 10 seconds
    cooldown message: &cWait %remaining time% before tracking again.
    trigger:
        if arg-1 is player:
            send "&cYou cannot track yourself."
            stop
        set {tracking::%player's uuid%} to arg-1's uuid
        set player's compass target to arg-1's location
        send "&aNow tracking &e%arg-1%&a. Hold a compass to follow them."

command /untrack:
    trigger:
        delete {tracking::%player's uuid%}
        set player's compass target to player's world's spawn location
        send "&cTracking disabled."

The {tracking::%player's uuid%} variable stores who each player is currently tracking. Using UUIDs ensures the data survives name changes.

Updating the Compass in Real Time

The compass target needs to update as the tracked player moves. Use a repeating task to refresh it:

every 1 second:
    loop all players:
        if {tracking::%loop-player's uuid%} is set:
            set {_target} to {tracking::%loop-player's uuid%}
            set {_targetPlayer} to {_target} parsed as offline player
            if {_targetPlayer} is online:
                set loop-player's compass target to {_targetPlayer}'s location
                set {_dist} to distance between loop-player and {_targetPlayer}
                send action bar "&eTracking &f%{_targetPlayer}% &7| &a%round({_dist})% blocks away" to loop-player
            else:
                send action bar "&cTarget player is offline." to loop-player
                delete {tracking::%loop-player's uuid%}

This runs once per second for all online players who have an active track target. One-second intervals are a good balance between accuracy and performance. For a skript player tracker minecraft setup on a large server (50+ players), you may want to increase this to every 2 seconds.

Compass Right-Click Quick Info

Add a right-click interaction so players can check distance instantly:

on right click holding compass:
    if {tracking::%player's uuid%} is set:
        set {_target} to {tracking::%player's uuid%} parsed as offline player
        if {_target} is online:
            set {_dist} to distance between player and {_target}
            set {_dir} to ""
            if {_target}'s x-coordinate > player's x-coordinate:
                set {_dir} to "East"
            else:
                set {_dir} to "West"
            send "&6Tracker &8» &f%{_target}% is &a%round({_dist})% blocks &fto the &e%{_dir}%"

Cross-World Handling

Compass targets only work within the same world. If the tracked player enters the Nether or End, you should notify the tracker:

every 1 second:
    loop all players:
        if {tracking::%loop-player's uuid%} is set:
            set {_target} to {tracking::%loop-player's uuid%} parsed as offline player
            if {_target} is online:
                if {_target}'s world is not loop-player's world:
                    send action bar "&cTarget is in a different world (%{_target}'s world%)" to loop-player
                else:
                    set loop-player's compass target to {_target}'s location
                    set {_dist} to distance between loop-player and {_target}
                    send action bar "&eTracking &f%{_target}% &7| &a%round({_dist})% blocks" to loop-player

This version replaces the earlier loop. It checks for world mismatches before updating the compass, preventing confusing pointer behavior when players are in different dimensions.

Permissions and Balancing

  • Use LuckPerms to assign tracker.use to specific ranks.
  • Consider adding an economy cost with EssentialsX, charge players per use to prevent spam tracking.
  • Add a tracker.exempt permission so staff or donators cannot be tracked.
  • The cooldown on /track prevents rapid target switching, which could be used to scan for nearby players.

Performance Tips

  • Never run the update loop faster than every 1 second unless you have fewer than 20 players.
  • Use Spark to check if the tracker loop causes tick lag.
  • Clean up tracking variables when players quit: add an on quit event that deletes {tracking::%player's uuid%}.

A skript player tracker is one of the most rewarding projects because players immediately understand and enjoy using it. Once you have this working, try extending it with particle trails, sound pings at close range, or team-based tracking restrictions.

Want to see custom plugins in action? Join Astroworld MC, IP play.astroworldmc.com, Java + Bedrock.

Related Tools & Resources

🔧

Minecraft Tools

Calculators, generators & server tools

🧱

Item Database

Browse all Minecraft items, stats & recipes

⚒️

Crafting Recipes

Visual crafting guides for every recipe