cancel event if it places a map

This commit is contained in:
Guntram Blohm 2019-04-05 14:31:26 +02:00
parent 95c08f5e52
commit 3830dc1924

View File

@ -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);