From 3830dc192418bf79b9889819bb7d6e887b505f44 Mon Sep 17 00:00:00 2001 From: Guntram Blohm Date: Fri, 5 Apr 2019 14:31:26 +0200 Subject: [PATCH] cancel event if it places a map --- src/main/java/de/craftlancer/imagemaps/ImageMaps.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/java/de/craftlancer/imagemaps/ImageMaps.java b/src/main/java/de/craftlancer/imagemaps/ImageMaps.java index 62e43ae..9f46b87 100644 --- a/src/main/java/de/craftlancer/imagemaps/ImageMaps.java +++ b/src/main/java/de/craftlancer/imagemaps/ImageMaps.java @@ -148,7 +148,7 @@ public class ImageMaps extends JavaPlugin implements Listener { e.getPlayer().sendMessage(ChatColor.RED + "Can't place the image here!\nMake sure the area is large enough, unobstructed and without pre-existing hanging entities."); else saveMaps(); - + e.setCancelled(true); placing.remove(e.getPlayer().getName()); } @@ -199,7 +199,7 @@ public class ImageMaps extends JavaPlugin implements Listener { return item; } - private BufferedImage loadImage(String file) { + public BufferedImage loadImage(String file) { if (images.containsKey(file)) return images.get(file);