Class BaseMap
java.lang.Object
com.github.darksoulq.abyssallib.world.item.map.BaseMap
Represents a base class for dynamically rendered custom maps in Minecraft.
Subclasses define rendering behavior via the
render(MapCanvas, Player) method.
Handles renderer setup, viewer registration, and map metadata persistence.-
Constructor Summary
ConstructorsConstructorDescriptionBaseMap(org.bukkit.plugin.Plugin plugin, org.bukkit.map.MapView mapView) Constructs a newBaseMapusing a providedMapView. -
Method Summary
Modifier and TypeMethodDescriptionorg.bukkit.inventory.ItemStackcreateMapItem(net.kyori.adventure.text.Component name, List<net.kyori.adventure.text.Component> lore) Creates a newItemStackof typeFILLED_MAPbound to this map view.org.bukkit.plugin.PluginReturns the plugin that owns this map.
-
Constructor Details
-
BaseMap
public BaseMap(org.bukkit.plugin.Plugin plugin, org.bukkit.map.MapView mapView) Constructs a newBaseMapusing a providedMapView. Registers the renderer and saves metadata for reloading later.- Parameters:
plugin- The plugin owning this map.mapView- The map view this map instance should render on.
-
-
Method Details
-
createMapItem
public org.bukkit.inventory.ItemStack createMapItem(net.kyori.adventure.text.Component name, List<net.kyori.adventure.text.Component> lore) Creates a newItemStackof typeFILLED_MAPbound to this map view.- Returns:
- A new map item bound to this map.
-
getPlugin
public org.bukkit.plugin.Plugin getPlugin()Returns the plugin that owns this map.- Returns:
- The owning
Plugin.
-