-
-
Notifications
You must be signed in to change notification settings - Fork 112
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(api): Add method for controlling warp item consumption in telepo…
…rt context (#747) * Prefer using tp context to decide consumesItem / allowTeleport This commit further prepares the phasing out of WarpMode by transferring some responsibilities to IWaystoneTeleportContext: - getConsumesPredicate to decide if a warp item ItemStack should be consumed - getAllowTeleportPredicate to decide if the teleport event is possible at all The PlayerWaystoneManager now uses these IWaystoneTeleportContext methods rather than WarpMode equivalents. Note that for backwards compatibility there is a default implementation which simply delegates to the WarpMode methods. * review: remove tpPredicate, simplify to isWarpItemConsumed * rename to match other methods in teleport context, add comment --------- Co-authored-by: BlayTheNinth <1933180+BlayTheNinth@users.noreply.github.com>
- Loading branch information
1 parent
62e2340
commit 1eca143
Showing
3 changed files
with
20 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters