Class BaseMap

java.lang.Object
com.github.darksoulq.abyssallib.world.item.map.BaseMap

public abstract class BaseMap extends Object
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

    Constructors
    Constructor
    Description
    BaseMap(org.bukkit.plugin.Plugin plugin, org.bukkit.map.MapView mapView)
    Constructs a new BaseMap using a provided MapView.
  • Method Summary

    Modifier and Type
    Method
    Description
    org.bukkit.inventory.ItemStack
    createMapItem(net.kyori.adventure.text.Component name, List<net.kyori.adventure.text.Component> lore)
    Creates a new ItemStack of type FILLED_MAP bound to this map view.
    org.bukkit.plugin.Plugin
    Returns the plugin that owns this map.

    Methods inherited from class Object

    equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • BaseMap

      public BaseMap(org.bukkit.plugin.Plugin plugin, org.bukkit.map.MapView mapView)
      Constructs a new BaseMap using a provided MapView. 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 new ItemStack of type FILLED_MAP bound 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.