Class RayCastUtil

java.lang.Object
dev.cerus.maps.raycast.RayCastUtil

public class RayCastUtil extends Object
Utility for getting the screen a player is looking at
  • Method Details

    • getTargetedScreen

      public static Optional<RayCastUtil.Result> getTargetedScreen(org.bukkit.entity.Player player, double maxDistance, MapScreen screen, MapScreen... additionalScreens)
      Get the screen and position a player is looking at
      Parameters:
      player - The player
      maxDistance - The maximum distance that we should check
      screen - Possible screens to check
      additionalScreens - Possible screens to check
      Returns:
      An optional that either contains the result or contains nothing
    • getTargetedScreen

      public static Optional<RayCastUtil.Result> getTargetedScreen(org.bukkit.entity.Player player, double maxDistance, MapScreen[] screens)
      Get the screen and position a player is looking at
      Parameters:
      player - The player
      maxDistance - The maximum distance that we should check
      screens - Possible screens to check
      Returns:
      An optional that either contains the result or contains nothing
    • getTargetedScreen

      public static Optional<RayCastUtil.Result> getTargetedScreen(org.bukkit.entity.Player player, double maxDistance, Iterable<MapScreen> screens)
      Get the screen and position a player is looking at
      Parameters:
      player - The player
      maxDistance - The maximum distance that we should check
      screens - Possible screens to check
      Returns:
      An optional that either contains the result or contains nothing