Content generated with AI — it may contain mistakes.

ExyliaStaff/GuidesUpdated in v1.8.0

Give staff x-ray vision

Let a staff member see ores through the stone to check a suspected miner, with limits on range and count.

Page 9 of 383 min read

X-ray vision outlines the ores around a staff member so they can see what a suspect is digging towards. Each ore is an invisible, glowing, client-only display entity shaped like the block: nothing is spawned on the server and nobody else sees it.

Before you start#

  • Install PacketEvents. X-ray vision is one of the few features that needs it; without PacketEvents the module stays off and everything else keeps working.
  • Give the staff rank exyliastaff.xrayvision, and exyliastaff.xrayvision.others for toggling it on somebody else.
  • The module switch is modules.xray-vision in plugins/ExyliaStaff/config.yml.

Steps#

Turn it on

Run /xray (alias /xrayvision) to toggle, or /xray on and /xray off to set it. In staff mode the Glowstone in the hotbar (X-RAY, slot 29) does the same, and shows ON or OFF.

Look around

Diamond, emerald, ancient debris, gold and iron ore within range glow in their own colour through the stone.

Toggle it for somebody else

Run /xray on <player>, /xray off <player> or /xray toggle <player>. The player is told who did it.

Check that it works#

Stand in a cave with ore a few blocks away behind stone and run /xray on. You should see "X-ray is on" and the ore outlined through the wall. /xray off removes the outlines.

Going further#

What is scanned#

The square of chunks within radius of your chunk, so 3 is a 7 by 7 square, from y-radius blocks below your feet to as many above, clamped to the world's height. Only loaded chunks are read, and the search runs off the main thread. Moving into a new chunk drops the outlines of the chunks that left the range and scans the ones that entered; changing world rescans everything. With refresh-seconds at 0 nothing is rescanned until you change chunk, so an ore mined in the meantime keeps its outline until then. Set it to a number of seconds to rescan on that interval.

max-blocks-per-player is a budget over every outline you have: once it is spent, further chunks add nothing. Lower it if the outlines make clients lag.

When it turns off#

Leaving staff mode turns x-ray off and remembers it off. Losing the permission does the same, a few seconds later. Quitting or a module disable turns it off without forgetting it, so it comes back on at your next session with "X-ray is still on from your last session".

Choosing the ores#

outlines maps a block material to its colour, as #RRGGBB or a colour name such as AQUA. Add or remove entries freely; an entry that is not a block or not a colour is dropped silently.

Commands and permissions#

CommandWhat it doesPermission
/xrayTurn x-ray vision on or off for yourself.exyliastaff.xrayvision
/xray on [player]Turn x-ray vision on (another player needs xrayvision.others).exyliastaff.xrayvision
/xray off [player]Turn x-ray vision off.exyliastaff.xrayvision
/xray toggle [player]Switch x-ray vision.exyliastaff.xrayvision
PermissionWho has itWhat it allows
exyliastaff.xrayvisionAdmins (op)See ores through blocks.
exyliastaff.xrayvision.othersAdmins (op)Toggle x-ray vision for another player.
Configuration (modules/xrayvision/config.yml)
plugins/ExyliaStaff/modules/xrayvision/config.yml
yaml
radius: 3
y-radius: 24
refresh-seconds: 0
max-blocks-per-player: 2000
outlines:
  DIAMOND_ORE: '#5DE5E5'
  DEEPSLATE_DIAMOND_ORE: '#5DE5E5'
  EMERALD_ORE: '#3FE05B'
  DEEPSLATE_EMERALD_ORE: '#3FE05B'
  ANCIENT_DEBRIS: '#FF5555'
  GOLD_ORE: '#FFD24A'
  DEEPSLATE_GOLD_ORE: '#FFD24A'
  IRON_ORE: '#E8E8E8'
  DEEPSLATE_IRON_ORE: '#E8E8E8'

Messages are in lang/<language>/modules/xrayvision/messages.yml: enabled, disabled, enabled-other and disabled-other (%target%), enabled-by and disabled-by (%staff%), permission-lost, restored, status-on and status-off. See ExyliaLib messages.

Placeholders
PlaceholderValue
%staff_xrayvision_status%status-on or status-off for the viewer.
%staff_xrayvision_active%true while the viewer has x-ray vision on, without the colour status carries.

Something missing on this page? Tell us on Discord