This commit is contained in:
Vlammar 2020-06-14 12:04:09 +02:00
parent 46cae5bb33
commit 11b4ad6612
5 changed files with 3 additions and 12 deletions

View File

@ -75,7 +75,7 @@
<dependency> <dependency>
<groupId>fr.zcraft</groupId> <groupId>fr.zcraft</groupId>
<artifactId>zlib</artifactId> <artifactId>zlib</artifactId>
<version>0.99-SNAPSHOT</version> <version>1.0-SNAPSHOT</version>
<scope>compile</scope> <scope>compile</scope>
</dependency> </dependency>
<dependency> <dependency>

View File

@ -37,8 +37,6 @@ public final class PluginConfiguration extends Configuration
static public ConfigurationItem<Integer> MAP_GLOBAL_LIMIT = item("map-global-limit", 0, "Limit-map-by-server"); static public ConfigurationItem<Integer> MAP_GLOBAL_LIMIT = item("map-global-limit", 0, "Limit-map-by-server");
static public ConfigurationItem<Integer> MAP_PLAYER_LIMIT = item("map-player-limit", 0, "Limit-map-by-player"); static public ConfigurationItem<Integer> MAP_PLAYER_LIMIT = item("map-player-limit", 0, "Limit-map-by-player");
static public ConfigurationItem<Integer> MAP_SIZE_NOTOP_LIMIT = item("map-size-notop-limit", 0, "Size-limit-map-notop");
static public ConfigurationItem<Boolean> SAVE_FULL_IMAGE = item("save-full-image", true); static public ConfigurationItem<Boolean> SAVE_FULL_IMAGE = item("save-full-image", true);

View File

@ -18,7 +18,6 @@
package fr.moribus.imageonmap.image; package fr.moribus.imageonmap.image;
import fr.moribus.imageonmap.ImageOnMap;
import fr.moribus.imageonmap.PluginConfiguration; import fr.moribus.imageonmap.PluginConfiguration;
import fr.moribus.imageonmap.map.ImageMap; import fr.moribus.imageonmap.map.ImageMap;
import fr.moribus.imageonmap.map.MapManager; import fr.moribus.imageonmap.map.MapManager;
@ -27,9 +26,9 @@ import fr.zcraft.zlib.components.worker.Worker;
import fr.zcraft.zlib.components.worker.WorkerAttributes; import fr.zcraft.zlib.components.worker.WorkerAttributes;
import fr.zcraft.zlib.components.worker.WorkerCallback; import fr.zcraft.zlib.components.worker.WorkerCallback;
import fr.zcraft.zlib.components.worker.WorkerRunnable; import fr.zcraft.zlib.components.worker.WorkerRunnable;
import org.bukkit.Bukkit;
import javax.imageio.ImageIO; import javax.imageio.ImageIO;
import org.bukkit.Bukkit;
import java.awt.image.BufferedImage; import java.awt.image.BufferedImage;
import java.io.IOException; import java.io.IOException;
import java.io.InputStream; import java.io.InputStream;
@ -139,7 +138,6 @@ public class ImageRendererExecutor extends Worker
if(PluginConfiguration.SAVE_FULL_IMAGE.get()) { if(PluginConfiguration.SAVE_FULL_IMAGE.get()) {
ImageIOExecutor.saveImage(ImageMap.getFullImageFile(mapsIDs[0], mapsIDs[mapsIDs.length - 1]), image); ImageIOExecutor.saveImage(ImageMap.getFullImageFile(mapsIDs[0], mapsIDs[mapsIDs.length - 1]), image);
} }
submitToMainThread(new Callable<Void>() submitToMainThread(new Callable<Void>()

View File

@ -85,7 +85,7 @@ public abstract class ImageMap implements ConfigurationSerializable
return MapItemManager.give(player, this); return MapItemManager.give(player, this);
} }
public static File getFullImageFile(short mapIDstart, short mapIDend) public static File getFullImageFile(int mapIDstart, int mapIDend)
{ {
return new File(ImageOnMap.getPlugin().getImagesDirectory(), "_"+mapIDstart+"-"+mapIDend+".png"); return new File(ImageOnMap.getPlugin().getImagesDirectory(), "_"+mapIDstart+"-"+mapIDend+".png");
} }

View File

@ -18,11 +18,6 @@ map-global-limit: 0
map-player-limit: 0 map-player-limit: 0
#Limit to the size of map non operator can render
#The value is the number of map used for the image for instance if you make a map 10 X 12 you will get 120 maps
map-size-notop-limit: 256
#Maximum size in pixels for an image to be. 0 is unlimited. #Maximum size in pixels for an image to be. 0 is unlimited.
limit-map-size-x: 0 limit-map-size-x: 0
limit-map-size-y: 0 limit-map-size-y: 0