Skip to content

Commit

Permalink
Improve player teleport/spawn event docs
Browse files Browse the repository at this point in the history
  • Loading branch information
PseudoKnight committed Oct 4, 2023
1 parent e75d6a2 commit 45ffc9f
Showing 1 changed file with 7 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -371,8 +371,10 @@ public String getName() {
@Override
public String docs() {
return "{} "
+ "{player | from: The location the player is coming from | to: The location the player is now in |"
+ " type: the type of teleport occuring, one of "
+ " Fired when a player is teleported for any reason, except when respawning."
+ "{player | from: The location the player is teleporting from"
+ " | to: The location the player is teleporting to"
+ " | type: the type of teleport cause, one of "
+ StringUtils.Join(MCTeleportCause.values(), ", ") + "}"
+ "{to}"
+ "{}";
Expand Down Expand Up @@ -1904,8 +1906,9 @@ public String docs() {
return "{player: <macro> The player that switched worlds "
+ "| from: <string match> The world the player is coming from "
+ "| to: <string match> The world the player is now in}"
+ " This event is fired off when a player changes worlds. This event is not cancellable,"
+ " so to prevent it, the player_teleport event must be checked."
+ " This event is fired after a player changes worlds, so it is not cancellable."
+ " To prevent a player from changing worlds, consider cancelling or modifying player_teleport"
+ " and player_spawn events."
+ "{player | from: The world the player is coming from | to: The world the player is now in}"
+ "{}"
+ "{player, from}";
Expand Down

0 comments on commit 45ffc9f

Please sign in to comment.