Class MoveEventListener

java.lang.Object
org.sgrewritten.stargate.listener.MoveEventListener
All Implemented Interfaces:
org.bukkit.event.Listener

public class MoveEventListener extends Object implements org.bukkit.event.Listener
A listener for relevant move events, such as a player entering a stargate
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    onEntityPortalTeleport(@NotNull org.bukkit.event.entity.EntityPortalEvent event)
    Listens for and cancels any default vehicle portal events caused by stargates
    void
    onPlayerMove(@NotNull org.bukkit.event.player.PlayerMoveEvent event)
    Listens for any player movement and teleports the player if entering a stargate
    void
    onPlayerTeleport(@NotNull org.bukkit.event.player.PlayerTeleportEvent event)
    Listens for and cancels any default player teleportation events caused by stargates
    void
    onVehicleMove(org.bukkit.event.vehicle.VehicleMoveEvent event)
    Listens for any vehicle movement and teleports the vehicle if entering a stargate

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • MoveEventListener

      public MoveEventListener(RegistryAPI registry)
      Parameters:
      registry -

      the registry containing all information about portals

  • Method Details

    • onEntityPortalTeleport

      public void onEntityPortalTeleport(@NotNull @NotNull org.bukkit.event.entity.EntityPortalEvent event)
      Listens for and cancels any default vehicle portal events caused by stargates
      Parameters:
      event -

      The triggered entity portal event

    • onPlayerTeleport

      public void onPlayerTeleport(@NotNull @NotNull org.bukkit.event.player.PlayerTeleportEvent event)
      Listens for and cancels any default player teleportation events caused by stargates
      Parameters:
      event -

      The triggered player teleportation event

    • onPlayerMove

      public void onPlayerMove(@NotNull @NotNull org.bukkit.event.player.PlayerMoveEvent event)
      Listens for any player movement and teleports the player if entering a stargate
      Parameters:
      event -

      The triggered player move event

    • onVehicleMove

      public void onVehicleMove(org.bukkit.event.vehicle.VehicleMoveEvent event)
      Listens for any vehicle movement and teleports the vehicle if entering a stargate
      Parameters:
      event -

      The triggered vehicle move event