Visits
On this page(11)
/zone visit <player> teleports you next to a player who is fighting in their zone. It shows you their fight as they see it. /zone spectate <player> does the same while nobody sees you, a tool for staff. A visit never changes anyone's progress.
| Files | commands.visit and commands.spectate of modules/zones/config.yml |
| Player commands | /zone visit <player>, /zone spectate <player> (alias spect) |
| Permissions | sndungeons.zones.visit (everyone), sndungeons.zones.spectate (operators until granted) |
| Settings | zones.show-visitors, zones.visit-notice |
What you see
You see the visited player's fight in the world as they see it:
- their zone mobs, with their names, health and deaths;
- the damage holograms of their hits, while their own
zones.damage-numbersis on; - their zone NPC and its throws;
- the mobs, fake players, displays, lightning bolts and second hand of their enchants, with their sounds and particles;
- their afk clones, heroes and autofighter NPC;
- the models of all of these.
Their HUD, boss bars, titles and chat lines stay theirs. You cannot hit their mobs: a click does nothing. Your own mobs and your own fight rest until the visit ends.
Spectate is the same view, but nobody sees you: not the player you watch, not anyone else, not players who join meanwhile. The player is never told.
Settings that decide what you see
What you see follows YOUR settings in /settings:
| Your setting | What it hides from you |
|---|---|
sword.enchant-entities | Their enchant entities and second hand, whatever they chose for themselves |
core.sounds | The sounds |
core.particles | The particles |
afk.view-others | Their afk clones |
heroes.view-others | Their heroes |
autofighter.view-others | Their autofighter NPC |
The visited player decides only two things, both on by default:
| Their setting | Category | What it does |
|---|---|---|
zones.show-visitors | Visuals | Whether they see the players who visit them |
zones.visit-notice | Chat | Whether they get a chat line when someone visits them |
A spectate ignores both. See Player Settings.
How a visit ends
Any of these ends it:
- you: any teleport of yours (an ender pearl,
/spawn, another plugin), a world change, a quit or a death; - your commands:
/zone go,backornextwhen they move you; - them: a quit, a death, a world change or a zone change, or a teleport that leaves their zone;
- the server: the zones module turning off.
Leaving their zone means another world, or out of the columns of their mob area widened by mobs.leave-area-distance. An autofighter step does not end it. A /dungeons reload keeps the visit.
When it ends, you stay where you are and get the visit.ended line with the reason. Your own mobs come back.
Refused visits
You cannot visit:
- yourself;
- a player who is not fighting in a zone right now;
- a player who is visiting someone;
- while you already visit someone (any teleport ends that visit);
- while you are dead or in spectator mode, or before your data is loaded.
A player who starts a visit of their own ends the visits they had.
Notes
- Models. Each visitor gets their own copy of every model: zone mobs, the NPC, enchant entities, a second hand. Each counts against
models.max-engine-modelsandmax-entity-carriersofconfig.yml. A visitor whose model cannot be drawn sees the vanilla look. See Models. - Arriving. Short-lived effects already alive when you arrive (an enchant mob or display) are not sent to you. The next ones are. A second hand is sent. A mob already dying when you arrive is not.
- Tab list. With
isolation.hide-in-tab: false, a spectator the isolation already hid from a player keeps their tab entry for that player.
Configuration
Both blocks take the keys of every subcommand of /zone:
| Key | Default | What it does |
|---|---|---|
commands.visit.enable | true | false: /zone visit does not exist. |
commands.visit.aliases | [] | Other names of the subcommand. |
commands.visit.permission | 'sndungeons.zones.visit' | The permission needed. '' = none. |
commands.spectate.enable | true | false: /zone spectate does not exist. |
commands.spectate.aliases | ['spect'] | Other names of the subcommand. |
commands.spectate.permission | 'sndungeons.zones.spectate' | The permission needed. '' = none. |
sndungeons.zones.visit is declared in plugin.yml with default: true, so every player may visit. Take it away with a permissions plugin. sndungeons.zones.spectate is not declared, so it stays OP-only until you grant it. Another node you write here is OP-only until granted too.
Commands
| Command | Default permission | Description |
|---|---|---|
/zone visit <player> | sndungeons.zones.visit (everyone) | Teleports you next to a player and shows you their fight. |
/zone spectate <player> (alias spect) | sndungeons.zones.spectate (operators only until granted) | The same as visit, invisible and silent. |
Messages
The texts live in modules/zones/lang/messages_en.yml, under visit: and spectate::
| Key | When |
|---|---|
visit.started | To the visitor once they arrived |
visit.notice | To the visited player (their zones.visit-notice; never for a spectate) |
visit.ended, spectate.ended | When it ends, with {reason} |
visit.reason.<reason> | The reason words: teleport, world, quit, death, zone, command, disabled |
visit.self, not-in-zone, busy, already, not-loaded, unavailable, failed | The refusals |
spectate.started | To the spectator once they arrived |
Placeholders
| Placeholder | Value |
|---|---|
%sndungeons_visit_state% | visit-none, visit-visiting or visit-spectating |
%sndungeons_visit_state_label% | Its word, from status.state-<state> of lang/messages_en.yml |
%sndungeons_visit_target% | The name of the player you visit, empty when none |
%sndungeons_visit_visitors% | How many players visit you now, spectators not counted |
See Placeholders. Other plugins can read and cancel visits through the API: see Developer API.
Tips
- A visit safely shows off a zone or a strong sword: a visitor cannot hit the visited player's mobs.
- Give
sndungeons.zones.spectateto your staff rank only. It lets them watch a suspect without warning them.
Default visit and spectate blocks of modules/zones/config.yml
commands:
# /zone visit <player>: teleports next to a player who fights in their zone
# and shows you everything they see (their mobs, holograms, enchants, clones,
# heroes, autofighter); you cannot hit their mobs and your own mobs rest
# until you leave (any teleport, /zone go|back|next, a world change). They
# see you unless they switched zones.show-visitors off in /settings and get
# the zones.visit-notice line. sndungeons.zones.visit is given to everyone by
# plugin.yml (default true; take it away with a permissions plugin); another
# node you write here is OP-only until granted.
visit:
enable: true
aliases: []
permission: 'sndungeons.zones.visit'
# /zone spectate <player>: like visit, but invisible and silent (the player
# never sees you nor gets the notice): a staff tool.
spectate:
enable: true
aliases: ['spect']
permission: 'sndungeons.zones.spectate'