Package dev.cerus.maps.raycast
Class RayCastUtil
java.lang.Object
dev.cerus.maps.raycast.RayCastUtil
Utility for getting the screen a player is looking at
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classThe result of a map screen ray cast operation -
Method Summary
Modifier and TypeMethodDescriptionstatic Optional<RayCastUtil.Result>getTargetedScreen(org.bukkit.entity.Player player, double maxDistance, MapScreen[] screens)Get the screen and position a player is looking atstatic Optional<RayCastUtil.Result>getTargetedScreen(org.bukkit.entity.Player player, double maxDistance, MapScreen screen, MapScreen... additionalScreens)Get the screen and position a player is looking atstatic Optional<RayCastUtil.Result>getTargetedScreen(org.bukkit.entity.Player player, double maxDistance, Iterable<MapScreen> screens)Get the screen and position 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 playermaxDistance- The maximum distance that we should checkscreen- Possible screens to checkadditionalScreens- 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 playermaxDistance- The maximum distance that we should checkscreens- 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 playermaxDistance- The maximum distance that we should checkscreens- Possible screens to check- Returns:
- An optional that either contains the result or contains nothing
-