mirror of
https://github.com/SydMontague/ImageMaps.git
synced 2024-11-26 04:15:16 +01:00
cancel event if it places a map
This commit is contained in:
parent
95c08f5e52
commit
3830dc1924
@ -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);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user