Class v1_20_R1
- All Implemented Interfaces:
MapUtil
MapUtil
, it can only be defined once if
the server is running under this version, see MapUtilVersion
.- Since:
- 2023-06-15
- Version:
- 1.0.0
- Author:
- Xxathyx
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionint
getMapId
(org.bukkit.map.MapView mapView) Gets an map-id according to aMapView
.org.bukkit.map.MapView
getMapView
(int id) Gets aMapView
according to the server running version.void
update
(org.bukkit.entity.Player player, int id, byte[] buffer) Performs a map-id update for a certain player.
-
Constructor Details
-
v1_20_R1
public v1_20_R1()
-
-
Method Details
-
update
public void update(org.bukkit.entity.Player player, int id, byte[] buffer) Description copied from interface:MapUtil
Performs a map-id update for a certain player. -
getMapView
public org.bukkit.map.MapView getMapView(int id) Description copied from interface:MapUtil
Gets aMapView
according to the server running version.Note: The API isn't used directly, its because
invalid @link
Bukkit#getMap(int)
Integer
parameter and notShort
, while compiling with latest version of the API may results in aNoSuchMethodError
for org.bukkit.Bukkit.getMap(I)Lorg/bukkit/map/MapView} in older versions, thats why this method is used instead to support older ones.- Specified by:
getMapView
in interfaceMapUtil
- Parameters:
id
- The targeted map-id to obtain anMapView
.- Returns:
- The corresponding MapView to the given id.
-
getMapId
public int getMapId(org.bukkit.map.MapView mapView) Description copied from interface:MapUtil
Gets an map-id according to aMapView
.This getter do the opposite of
MapUtil.getMapView(int)
.Note: The API isn't used directly, its because
invalid @link
Bukkit#getMap(int)
Integer
parameter and notShort
, while compiling with latest version of the API may results in aNoSuchMethodError
for org.bukkit.Bukkit.getMap(I)Lorg/bukkit/map/MapView} in older versions, thats why this method is used instead to support older ones.
-