mirror of
https://github.com/SydMontague/ImageMaps.git
synced 2025-02-19 21:42:00 +01:00
Release as 0.1
Updated plugin.yml Fixed folder generation on startup
This commit is contained in:
parent
6adacd9a41
commit
aa58da0f85
@ -31,15 +31,15 @@ public class ImageMapCommand implements TabExecutor
|
|||||||
|
|
||||||
public boolean onCommand(CommandSender sender, Command cmd, String label, String[] args)
|
public boolean onCommand(CommandSender sender, Command cmd, String label, String[] args)
|
||||||
{
|
{
|
||||||
if (!sender.hasPermission("imagemaps.command") || !(sender instanceof Player))
|
if (!sender.hasPermission("imagemaps.use") || !(sender instanceof Player))
|
||||||
return false;
|
return true;
|
||||||
|
|
||||||
if (args.length < 1)
|
if (args.length < 1)
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
plugin.startPlacing((Player) sender, args[0]);
|
plugin.startPlacing((Player) sender, args[0]);
|
||||||
|
|
||||||
sender.sendMessage("started placing");
|
sender.sendMessage("Started placing of " + args[0] + ". Rightclick on a block, that shall be the upper left conor.");
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
@ -38,7 +38,7 @@ public class ImageMaps extends JavaPlugin implements Listener
|
|||||||
public void onEnable()
|
public void onEnable()
|
||||||
{
|
{
|
||||||
if (!new File(getDataFolder(), "images").exists())
|
if (!new File(getDataFolder(), "images").exists())
|
||||||
new File(getDataFolder(), "images").mkdir();
|
new File(getDataFolder(), "images").mkdirs();
|
||||||
|
|
||||||
loadMaps();
|
loadMaps();
|
||||||
getCommand("imagemap").setExecutor(new ImageMapCommand(this));
|
getCommand("imagemap").setExecutor(new ImageMapCommand(this));
|
||||||
|
@ -4,4 +4,9 @@ version: ${project.version}
|
|||||||
name: ImageMaps
|
name: ImageMaps
|
||||||
commands:
|
commands:
|
||||||
imagemap:
|
imagemap:
|
||||||
usage: "/imagemap <file> - then rightlick on a block"
|
usage: "/imagemap <file> - then rightlick on a block"
|
||||||
|
permission: imagemaps.use
|
||||||
|
permissions:
|
||||||
|
imagemaps.use:
|
||||||
|
default: op
|
||||||
|
|
Loading…
Reference in New Issue
Block a user