mirror of
https://github.com/SydMontague/ImageMaps.git
synced 2024-11-01 00:09:30 +01:00
Fix 1.13 incompatibility
This commit is contained in:
parent
f12302c800
commit
8a509043a5
2
pom.xml
2
pom.xml
@ -4,7 +4,7 @@
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<groupId>net.craftcitizen</groupId>
|
||||
<artifactId>imagemaps</artifactId>
|
||||
<version>1.0.4</version>
|
||||
<version>1.0.5</version>
|
||||
<name>ImageMaps</name>
|
||||
<description>Render Images onto maps!</description>
|
||||
|
||||
|
@ -143,6 +143,12 @@ public class ImageMaps extends JavaPlugin implements Listener {
|
||||
return version.getMinor() > 14;
|
||||
}
|
||||
|
||||
public boolean isSetTrackingSupported() {
|
||||
SemanticVersion version = Utils.getMCVersion();
|
||||
|
||||
return version.getMajor() >= 1 && version.getMinor() >= 14;
|
||||
}
|
||||
|
||||
private void saveMaps() {
|
||||
FileConfiguration config = new YamlConfiguration();
|
||||
config.set(CONFIG_VERSION_KEY, CONFIG_VERSION);
|
||||
@ -193,6 +199,7 @@ public class ImageMaps extends JavaPlugin implements Listener {
|
||||
return;
|
||||
}
|
||||
|
||||
if(isSetTrackingSupported())
|
||||
map.setTrackingPosition(false);
|
||||
map.getRenderers().forEach(map::removeRenderer);
|
||||
map.addRenderer(new ImageMapRenderer(image, imageMap.getX(), imageMap.getY(), imageMap.getScale()));
|
||||
@ -395,6 +402,7 @@ public class ImageMaps extends JavaPlugin implements Listener {
|
||||
MapView map = getServer().createMap(getServer().getWorlds().get(0));
|
||||
map.getRenderers().forEach(map::removeRenderer);
|
||||
map.addRenderer(new ImageMapRenderer(image, x, y, getScale(image, data.getSize())));
|
||||
if(isSetTrackingSupported())
|
||||
map.setTrackingPosition(false);
|
||||
|
||||
MapMeta meta = ((MapMeta) item.getItemMeta());
|
||||
|
Loading…
Reference in New Issue
Block a user