Class MapClickEvent

java.lang.Object
org.bukkit.event.Event
de.pianoman911.mapengine.api.event.MapEvent
de.pianoman911.mapengine.api.event.MapClickEvent

public class MapClickEvent extends MapEvent
Represents a click on a map done by a player.
  • Constructor Details

    • MapClickEvent

      public MapClickEvent(IMapDisplay display, MapClickType clickType, org.bukkit.entity.Player player, Vec2i clickPos, org.bukkit.Location worldPos, double interactDistance)
  • Method Details

    • clickType

      public MapClickType clickType()
      Returns:
      the interaction type used by the player
    • player

      public org.bukkit.entity.Player player()
      Returns:
      the player doing the click
    • x

      public int x()
      Returns:
      the clicked x-position in pixels
    • y

      public int y()
      Returns:
      the clicked y-position in pixels
    • asVec2i

      public Vec2i asVec2i()
      Returns:
      the clicked position as an Vec2i
    • worldPos

      public org.bukkit.Location worldPos()
      Returns:
      the clicked position in the world as a Location
    • interactDistance

      public double interactDistance()
      Returns:
      the distance at which the player clicked the map
    • passthroughMode

      @NotNull public @NotNull PassthroughMode passthroughMode()
      Returns:
      the PassthroughMode of this event
    • setPassthroughMode

      @Deprecated(forRemoval=true) public void setPassthroughMode(@NotNull @NotNull PassthroughMode passthroughMode)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Used for filtering the PassthroughMode of the packets which triggered this event.
      Parameters:
      passthroughMode - the new passthrough mode
    • passthroughMode

      public void passthroughMode(@NotNull @NotNull PassthroughMode passthroughMode)
      Used for filtering the PassthroughMode of the packets which triggered this event.
      Parameters:
      passthroughMode - the new passthrough mode
    • toString

      public String toString()
      Overrides:
      toString in class Object