Skip to main content

Checkpoints

Introduction​

Checkpoints function only if activated in configuration settings (i.e. use_checkpoint_system=true in config.yml). Checkpoints are used to teleport players under the following conditions:

checkpoints.png

How are checkpoints saved​

Checkpoints are saved for a player in the following scenarios:

  • When entering a puzzle area, the exact location of this type of checkpoint can be chosen (see area configuration checkpoint button). This is called a "puzzle area spawn point".
  • When leaving a puzzle area after fulfilling victory conditions, the checkpoint is saved at the player's position when he first step out. Victory conditions can be configured for each area can be configured (see area configuration page for more details). This is called a "puzzle area victory spawn point".

Erasing checkpoints​

Checkpoints can be erased for a player in the following scenarios:

Overriding Checkpoints​

Checkpoints in Lasers-Enigma can be overridden by other plugins—or they can override those set by other plugins—depending on the following configuration settings:

Priority Levels​

The following priority levels, arranged from low to high, determine wether Lasers Enigma's teleportation destination can be overridden by other plugins:

  • LOWEST : Lasers-Enigma's teleport destination will be overridden if another plugin attempts to teleport the player.
  • LOW
  • NORMAL
  • HIGH
  • HIGHEST : Lasers-Enigma's teleport destination will NOT be overridden, preventing another plugin to teleport the player.

Listeners with lower priority are called first while listeners with higher priority are called last. That is, last will always override.

For further details, refer to Bukkit EventPriority javadoc.

Example Scenario​

image

Diagram showing Plugin X's event listener being overridden by Plugin Y's event listener being overridden by Lasers Enigma's event listener.

  1. A plugin Y is configured to teleport players to the global spawn point when a player join the server. It listens to the PlayerJoinEvent with a NORMAL priority.
  2. A player enters a puzzle area and has a checkpoint saved in Lasers-Enigma, representing the area's spawn point.
  3. When the player leaves and rejoins the server:
    • Plugin Y's event listener is triggered first (due to its NORMAL priority) and teleports the player to the global spawn point.
    • Subsequently, Lasers-Enigma's event listener, configured with player_join_event_priority=HIGHEST, is invoked. It teleports the player to the area spawn point, thereby overriding Plugin Y's destination.