Dependency:
PacketEvents API
Showcase:
Default configs:
Code (Text):
TargetTracker
├─ config.yml
└─ points
└─ example.yml
config.yml:
Code (YAML):
player-points:
enabled
: true
max-range
: -1
max-lines
: 2
#If the player has the custom text permission (custom-text), how many lines can they enter at most. Set to 0 for no limit.
permissions
:
#Leave blank means player don't need permission
open
:
"targettracker.player.open"
start
:
"targettracker.player.start"
share
:
"targettracker.player.share"
stop
:
""
list
:
"targettracker.player.list"
text-display
:
""
block-display
:
"targettracker.player.block"
item-display
:
"targettracker.player.item"
beam
:
"targettracker.player.beam"
custom-text
:
"targettracker.player.custom.text"
custom-block
:
"targettracker.player.custom.block"
custom-item
:
"targettracker.player.custom.item"
text-color
:
"targettracker.player.text.color"
text-format
:
"targettracker.player.text.format"
defaults:
show-in-list
: true
display
:
"Tracking point"
target:
type
: text
scale
: 2
beam:
length
: 255
width
: 1
spinspeed
: 1
block
:
"glass"
offset
: 0
display
:
- '⨀'
mark:
type
: text
scale
: 1
distance
: 5
display
:
- '✥'
- '
%distance% blocks'
trigger-distance
: 4
fade-speed
: 10
stop-triggers
:
- 'quit'
- 'death'
- 'attack'
- 'damaged'
- 'world_change'
- 'teleport'
message:
usage
: '&cUsage
: /
%label% <player> <point ID> [trigger action]'
player-not-exist
: '&cPlayer
%player% is offline or does not exist'
point-not-found
: '&cPoint not found
:
%point%'
track-started
: '&aStarted tracking point
%point% for player %player%'
track-start-failed
: '&cFailed to start,
%player% is already tracking point %point%'
track-stopped
: '&aStopped tracking point
%point% for player %player%, trigger action: %trigger%'
track-stopped-failed
: '&cFailed to stop, player
%player% is not tracking point %point%'
track-cancelled
: '&cFailed to stop, the operation was cancelled'
not-player
: '&cOnly players can use this command'
reload
: '&aConfiguration and tracking points reloaded'
reload-failed
: '&cAn error occurred during reload, please check the console'
start-same-point
: 'Cannot start tracking the same point
:
%point%'
all-tracks-stopped
: '&cStopped
all tracking points for player
%player%'
all-tracks-stopped-failed
: '&cPlayer
%player% has no active tracking points'
dialog-title
: '&6Please choose an action'
dialog-start-title
: '&6Please enter parameters'
dialog-list-title
: '&6Ongoing Tracking'
dialog-stop-title
: '&6Stop Tracking'
dialog-display-types
: '&fMarker Type'
dialog-display-text
: '&aText'
dialog-display-block
: '&aBlock'
dialog-display-item
: '&aItem'
dialog-confirm
: '&aConfirm'
dialog-cancel
: '&cCancel'
dialog-start
: '&aCreate Tracking Point'
dialog-stop
: '&cStop Ongoing Tracking'
dialog-list
: '&aView Ongoing Tracking'
dialog-location
: '&aTarget coordinates in x,y,z format'
dialog-custom-display
: '&aCustom display name, used for listing and share'
dialog-custom-text
: '&aCustom text to show on marker'
dialog-custom-block
: '&aCustom block marker, enter block ID, e.g., stone'
dialog-custom-item
: '&aCustom item marker, enter item ID, e.g., diamond'
dialog-custom-beam
: '&aCustom beam block display, enter block ID, e.g., tnt'
dialog-share
: '&aPlayers to share tracking with, separate names with commas'
dialog-created-by-server
: '&eCreated by system'
dialog-created-by
: '&eCreator
:
%player%'
dialog-no-points
: '&cNo tracking points currently available'
wrong-material
: '&cInvalid material
:
%material%'
no-location
: '&cYou didn’t enter coordinates'
too-close
: '&cThis point is too close to another tracked point, please enter different coordinates'
wrong-number
: '&cIncorrect number of parameters, you only need to input three coordinates
: x,y,z'
invalid-number
: '&cCoordinates must be integers'
out-of-range
: '&cTracking point is out of allowed range, max distance is
%distance%, your point is %now-distance% blocks away'
point-share-message
: '&e
%player%&a has shared a tracking point with you &d(%display%: %location%)&a! Click to join!'
example.yml:
Code (YAML):
point1:
display
:
"Point"
show-in-list
: true
target:
type
: text
# block: tnt[unstable=true]
scale
: 2
#Scale of the icon
location
: world,100,100,100
display
:
- '&6?'
- '&aMark'
beam
:
#beam is optional, you can remove this part
length
: 255
#length(height) of the beam
width
: 1
#width
spinspeed
: 1
#spin speed of the beam, set to negative for reverse spin
block
:
"red_stained_glass"
#block data
offset
: 0.5
#vertical offset
mark:
scale
: 0.5
type
: block
block
:
"tnt"
distance
: 3
#distance to player
display
:
- '✥'
- '
%distance% blocks'
trigger-distance
: 4
fade-speed
: 5
stop-triggers
:
- 'quit'
- 'death'
- 'attack'
- 'damaged'
- 'world_change'
- 'teleport'
actions:
- 'command
: say a'
- 'op
: say b'
- 'console
: say c'
#run command as player/op/console
- 'message
:
&4Point achieved!'
- 'title
:
&4Point;&6Achieved;20;20;20'
- 'actionbar
:
&4Point achieved!'
- 'sound
: entity.player.death;1;0'
- 'lightning
: target;100;100;100'
- 'firework
: player;
#123456,#654321,#111111;BALL;#123456,#000000;0' #Generate a firework with the following parameters: position, color, type, fade color, and flight power.
- 'start
: point2'
#start track of another point
point2:
target:
scale
: 2
location
: world,-3940,109,2540
display
:
- '&6?'
- '&aMark 2'
mark:
scale
: 1
distance
: 5
display
:
- '✥'
- '
%distance% blocks'
trigger-distance
: 4
fade-speed
: 10
actions:
- 'command
: say b'
- Points are divided into target and mark sections, representing the target location and the guiding marker point for navigation.
scale: A shared property that represents the scaling size of the text.
display: A shared property representing the content displayed. It is recommended not to include too many lines. Supports `%player%` and `%distance%` variables, which represent the player's name and distance, respectively, as well as PlaceholderAPI (PAPI) variables.
location and mark:
- type: text/block/item
- block(if type is block): the block of the icon
- item(if type is item): the item of the icon
target:
- location: The target location of the point.
- beam: see config
mark:
- distance: The distance between the marker point and the player. It is recommended to avoid distances that are too close or too far.
trigger-distance: The distance at which the point starts to fade. Upon disappearing, actions will be executed.
fade-speed: The speed at which the point fades (transparency decreases). Transparency starts at 255 and decreases by this value each tick until it reaches 25 (at which point the game defines it as fully transparent), triggering the action. To execute immediately, set a very high value.
- Stop Trigger Introduction:
You can configure tracking to stop when certain events are triggered.
- quit: Stops tracking when the player quits. By default, tracking resumes when the player rejoins the game.
- death: Stops tracking upon death.
- attack: Stops tracking when the player performs an attack.
- damaged: Stops tracking when the player takes damage.
- world_change: Stops tracking when the player changes worlds. By default, tracking resumes if the player returns to the original world.
- teleport: Stops tracking when the player teleports.
- Action Introduction:
Some actions require multiple parameters, separated by semicolons (`;`). All actions support `%distance%`, `%player%`, and PAPI variables.
- command: Executes a command as the player.
- console: Executes a command as the console.
- op: Executes a command with operator permissions. Use cautiously.
- message: Sends a message to the player.
- title: Sends a title message to the player. Requires five parameters:
1. Main title
2. Subtitle
3. Fade-in time (in ticks)
4. Duration (in ticks)
5. Fade-out time (in ticks)
(*20 ticks = 1 second*)
- actionbar: Sends an action bar message to the player.
- sound: Plays a sound. You can use vanilla sound formats or formats like `ENTITY_PLAYER_DEATH`. The second parameter is volume, and the third is pitch.
- lightning: Summons lightning for visual effects. The first parameter specifies the location, which can be `player`, `target`, or in the format `world_name,x,y,z`. Here, `player` refers to the player's position, and `target` refers to the target location.
- firework: Spawns a firework. Parameters include location, color, type, fade color, and flight height (power). The location format is the same as above.
- start: Starts tracking another point. Cannot start tracking itself.
- Command Introduction:
- /starttrack <player> <pointID>: Starts tracking a point.
- /stoptrack <player>: Stops all tracking for the player.
- /stoptrack <player> <pointID> [triggerAction]: Stops tracking a specific point. The third parameter can be `true` or `false` (default: `false`).
- /targettracker reload: Reloads the plugin's configuration and point files.
- /track: Main command of track menu
- PlaceholderAPI placeholders Introduction:
- %targettracker_isactive_<id>%: Whether the point with the specified ID is active.
- %targettracker_active/all_amount%: Total number of points currently being tracked or the total number of points.
- %targettracker_active/all_nearest/furthest_distance%: Distance of the nearest or furthest point being tracked (or among all points) from the player.
- %targettracker_active/all_nearest/furthest_markdisplay%: Description of the marker point of the nearest or furthest point being tracked (or among all points).
- %targettracker_active/all_nearest/furthest_targetdisplay%: Description of the target point of the nearest or furthest point being tracked (or among all points).
- %targettracker_active/all_nearest/furthest_id%: ID of the nearest or furthest point being tracked (or among all points).
- %targettracker_point_<id>_distance%: Distance of the specified point from the player.
- %targettracker_point_<id>_markdisplay%: Description of the marker point of the specified point.
- %targettracker_point_<id>_targetdisplay%: Description of the target point of the specified point.