Package de.pianoman911.mapengine.api
Interface MapEngineApi
public interface MapEngineApi
The main API class for the MapEngine plugin.
-
Method Summary
Modifier and TypeMethodDescriptioncolors()
@Nullable IMapDisplay
displayInView
(org.bukkit.entity.Player player, int maxDistance) Deprecated.@Unmodifiable Set
<IHoldableDisplay> static @NotNull MapEngineApi
instance()
Utility method to get the instance of the MapEngineApi.@Unmodifiable Set
<IMapDisplay> pipeline()
@Nullable MapTraceResult
traceDisplayInView
(org.bukkit.entity.Player player) Used to get a map display and the ray hit point in the view of a player.@Nullable MapTraceResult
traceDisplayInView
(org.bukkit.entity.Player player, int maxDistance) Used to get a map display and the ray hit point in the view of a player.
-
Method Details
-
instance
Utility method to get the instance of the MapEngineApi. You can also useBukkit.getServicesManager()
to get the instance.
WARNING: If MapEngine is not properly enabled before using this method, it will throw an exception.- Returns:
- the instance of the MapEngineApi
- Throws:
IllegalStateException
- if MapEngine is not enabled before calling this method
-
colors
IMapColors colors()- Returns:
- the color palette used for converting RGB colors to map colors and back
-
pipeline
IPipelineProvider pipeline()- Returns:
- the pipeline provider used for creating stuff
related to pipelining and updating
IMapDisplay
's
-
displayProvider
IDisplayProvider displayProvider()- Returns:
- the display provider used for creating
IMapDisplay
's andIHoldableDisplay
's
-
mapDisplays
@Unmodifiable Set<IMapDisplay> mapDisplays()- Returns:
- all currently active
IMapDisplay
's
-
holdableDisplays
@Unmodifiable Set<IHoldableDisplay> holdableDisplays()- Returns:
- all currently active
IHoldableDisplay
's
-
displayInView
@Deprecated @Nullable @Nullable IMapDisplay displayInView(org.bukkit.entity.Player player, int maxDistance) Deprecated.Used to get aIMapDisplay
in the view of the specified player.- Parameters:
player
- the player to check formaxDistance
- the maximum ray distance to check for a display- Returns:
- the display in view or null if nothing was found
-
traceDisplayInView
Used to get a map display and the ray hit point in the view of a player.- Parameters:
player
- the player to check for- Returns:
- the trace result or null if nothing was found
-
traceDisplayInView
@Nullable @Nullable MapTraceResult traceDisplayInView(org.bukkit.entity.Player player, int maxDistance) Used to get a map display and the ray hit point in the view of a player.- Parameters:
player
- the player to check formaxDistance
- the maximum ray distance to check for a display- Returns:
- the trace result or null if nothing was found
-
traceDisplayInView(Player, int)