ImageOnMap icon indicating copy to clipboard operation
ImageOnMap copied to clipboard

Maps from local files?

Open emctague opened this issue 5 years ago • 3 comments

I'm trying to use this plugin from within my own plugin - the idea is my plugin shows discord image links in chat which when clicked give the user the image using /tomap. Trouble is, your command can't download these images, so I have to pre-download them - but it doesn't seem I can trick your plugin into making maps from local files on the server.

This is a feature request for /tomap file://<whatever> to work for certain paths! :)

emctague avatar Apr 25 '20 19:04 emctague

It's already possible, on my local test server i used the folowing command: file:///C:/Users/admin/AppData/Roaming/.minecraft/screenshots/2019-11-24_12.52.08.png That gave me the following result https://i.zcraft.fr/2587751587857263.png You simply have to put file:///PathToImage You missed a /

Vlammar avatar Apr 25 '20 23:04 Vlammar

But we may change it to a specific folder, this is not realy cool to be able to access all stored image on a server ;). We may add a specific permission by default for OP only, if the link is not a valid one (no http(s) or ftp://) then we check a folder if the image is stored in it.

Vlammar avatar Apr 26 '20 00:04 Vlammar

Ah, I was only trying relative paths, assuming it'd work relative to the working directory of the server! Thanks for letting me know that it works with full paths... though that really is a bit of a security issue!

emctague avatar Apr 29 '20 02:04 emctague