On Server Switch

Description

Fires when a player who is already on the network moves to another server. It fires only on the server they arrive on: the server they left runs nothing for the move and does not need MythicProxy. A player leaving the network fires onNetworkQuit instead.

It is a player trigger: it runs on the player in MythicCrucible item skills, and the events.server-switch list of the Paper config runs skills for it. It never runs on mobs. It waits until the player's data has loaded on the new server, see Missed Events. Skill Variables lists the variables it sets.

This trigger requires MythicMobs Premium!

Examples

Needs MythicCrucible. The compass tells the player where they came from and where they arrived, while they hold it. In an item file:

TravelCompass:
  Id: COMPASS
  Skills:
  - message{m="You left <skill.var.from-server> and arrived on <skill.var.server>"} @self ~onServerSwitch

Greets only the players who arrive from the server named lobby. stringequals is case-sensitive, so write the name as it is in velocity.toml. In a skill file:

LobbySwitchNotice:
  Skills:
  - message{m="Welcome to <skill.var.server>"} @self ?stringequals{val1=<skill.var.from-server>;val2=lobby}

List it in the backend config.yml:

events:
  server-switch:
    - LobbySwitchNotice

Aliases

  • onSwitchServer
  • onServer_Switch
Updated Oct 29, 2026