Content generated with AI — it may contain mistakes.

ExyliaStaff/GuidesUpdated in v1.8.0

Inspect a player's inventory

Open a silent mirror of a player's inventory or ender chest, online or offline, and see when they were last on.

Page 7 of 383 min read

Inspect opens a live copy of a player's inventory or ender chest, or of a chest in the world, without a lid opening or a sound, so nobody notices. With the edit permission what you move is written back. It works on offline players too.

Before you start#

  • Give the staff rank exyliastaff.inspect. Add exyliastaff.inspect.enderchest for ender chests, exyliastaff.inspect.containers for chests and barrels in the world, and exyliastaff.inspect.edit to be allowed to change items.
  • The module switch is modules.inspect in plugins/ExyliaStaff/config.yml.
  • Live mirrors work without PacketEvents. Inspecting an offline player reads the player's data file with PacketEvents' NBT reader, so that part needs PacketEvents.

Steps#

Open an inventory

Run /inspect <player> (aliases /invsee, /examine). A window titled INVENTORY » name opens.

Open an ender chest

Run /echest <player> (alias /enderchest), or use the Book in the staff mode hotbar on a player within five blocks: right click for the inventory, left click for the ender chest.

Open a container

In staff mode, right click a chest, barrel or any other container with an empty hand. It opens silently as CONTAINER.

Each command takes anybody, online or not. Somebody on this server is mirrored live. Somebody online on another server is pointed there ("is online on Survival. Inspect them there."), because that server holds the real copy. Somebody offline is read from this server's player data.

Check that it works#

Inspect a test player who is holding something. You should see their items, the window follows them while it is open, and they hear nothing and see no animation. Without exyliastaff.inspect.edit the title says read-only and you cannot take items.

Going further#

Read-only or editable#

With exyliastaff.inspect.edit the inventory and ender chest mirrors are editable and the title says so; without it they are read-only. Container mirrors are always read-only. A mirror closes by itself when you leave staff mode, lose exyliastaff.inspect or the module is disabled.

Offline players#

Paper keeps one player-data file per player on each server, and that is what an offline inspection opens: inventory, armour and off hand, or ender chest, as they were when the player last left this server. Several staff looking at the same player share one copy.

With exyliastaff.inspect.edit the copy is editable and is written back to the file when the last staff member closes it. If the player logs in while it is open, every window on it closes and the copy is saved before the server reads the file, so they load what staff left. A file written by an older server version is shown but never rewritten. The title says (offline, editable) or (offline, read-only).

/seen#

/seen <player> (alias /lastseen) tells you when a player was last here. For somebody online here or elsewhere it shows the server they are on and their play time. For somebody offline it uses this server's records: how long ago they were last here and the date, their first join, their play time, and the world and coordinates they left from. A player who never joined this server is "has never played on this server". /tpoffline takes you to that spot. It needs exyliastaff.inspect.

Commands and permissions#

CommandWhat it doesPermission
/inspect <player>Open a player's inventory, online or offline.exyliastaff.inspect
/echest <player>Open a player's ender chest.exyliastaff.inspect.enderchest
/seen <player>See when a player was last online.exyliastaff.inspect
PermissionWho has itWhat it allows
exyliastaff.inspectAdmins (op)Open a player's inventory and use /seen.
exyliastaff.inspect.editAdmins (op)Change the items in an inspected inventory.
exyliastaff.inspect.enderchestAdmins (op)Open a player's ender chest.
exyliastaff.inspect.containersAdmins (op)Open containers while inspecting.
exyliastaff.inspect.ipAdmins (op)See a player's IP address.
Titles and messages

The window titles are text, so they live with the language:

plugins/ExyliaStaff/lang/en/modules/inspect/config.yml
yaml
inventory-title: '{primary}&lINVENTORY {letters_black}» {letters}%target%'
enderchest-title: '{primary}&lENDER CHEST {letters_black}» {letters}%target%'
container-title: '{primary}&lCONTAINER {letters_black}» {letters}%target%'

%target% is the player's name, or the container's block name for containers.

Messages are in lang/<language>/modules/inspect/messages.yml: opened and opened-enderchest (%target%, %mode%), no-target, open-failed, online-elsewhere (%target%, %server%), seen (%target%, %ago%, %date%, %first%, %playtime%, %location%), seen-online (%target%, %server%, %playtime%), seen-unknown, and the four words %mode% reads: mode-editable, mode-read-only, mode-offline-editable and mode-offline-read-only. See ExyliaLib messages and colours.

Something missing on this page? Tell us on Discord