Class TeleportHelperFilters

java.lang.Object
org.spongepowered.api.world.teleport.TeleportHelperFilters

public final class TeleportHelperFilters extends Object
  • Field Details

    • CONFIG

      public static final DefaultedRegistryReference<TeleportHelperFilter> CONFIG
      Designed to be combined with other filters, this filter determines if a block is in the config blacklist and returns the appropriate result.
    • DEFAULT

      public static final DefaultedRegistryReference<TeleportHelperFilter> DEFAULT
      The default behavior for safe teleportation.

      This filter attempts to find a location to teleport to that has the following characteristics:

      • The two blocks that the player would occupy (the target and the block above) are passable.
      • The floor is a non-passable or liquid block which is not known to harm the player.
      • The block in question is not blacklisted in the config for the floor or body (see CONFIG).
    • FLYING

      public static final DefaultedRegistryReference<TeleportHelperFilter> FLYING
      The flying safe teleportation behavior.

      This filter attempts to find the following:

      • A block that is air or a liquid which is not known by Sponge to harm the player.
      • A similar block one block above the target.
      • That floor blocks are not cacti (and thus, hurt).
    • NO_PORTAL

      public static final DefaultedRegistryReference<TeleportHelperFilter> NO_PORTAL
      This filter is the same as the DEFAULT kernel, except that portals are not valid targets.
    • SURFACE_ONLY

      public static final DefaultedRegistryReference<TeleportHelperFilter> SURFACE_ONLY
      This filter is the same as the DEFAULT kernel, except that only targets that can see the sky are considered.
  • Method Details