LOOHP/ImageFrame

[Suggestion] Command to Create a New ImageMap as Another Player

Closed this issue · 7 comments

Is it possible to execute a command in the console to give a map to a certain player? If not, can you please add such a function?

LOOHP commented

You can now do that with the imageframe.get.others permission and specifying which player at the last argument of the command in 1.7.0.2

so, this command, can "get" image that already exist to some player, i tested it, it works, but what I'm trying to do will not be able to use such a method, because I need to create script in MyCommand that would take money from vault for creating image. Here script that would work perfect, i think

buy_image_1x1:
  command: /buyimage1x1_tenor
  type: RUN_CONSOLE
  runcmd:
  - $Script$%if%$money>1000
  - "/imageframe give $player $arg1 https://media.tenor.com/$name_iteminhand 1 1"
  - "/balance take $player 1000"
  - $Script$%else%
  - $text$&enot enough money
  register: true
  permission-required: false

You can see this command:
/imageframe give $player(player nickname) $arg1(name for map) https://media.tenor.com/$name_iteminhand(name of item) 1 1
So this command would can give players maps, because this command would run in console, and players can't create images because they don't have permission, but console don't even need permission.
Can you please implement the feature with "give"?

And i already tested "permission-required: false" for running custom command player don't need permission, but if player don't heave permission for running "/imageframe", player can't be able create image.

Sorry if I wrote too much.

LOOHP commented

Essentially you want a way to create maps for other players. I'll make sure to consider adding that in the future.

But for now, since you are using a script anyway, perhaps you can give the player permission to create a map, force the player to execute the create command, and then revoke the create map permission afterwards.

Thank you for the offer, I'm not sure that it will be possible to implement it, but I will still wait for the plugin update, thank you for paying attention.

or maybe this command could be /imageframe get <name> <url> <width> <height> combined <player>

My friend added this feature to your plugin, but we don't know how to do a pull request, so here commands.txt. Can you add this feature? And can you do better if something is wrong? It's working from console with imageframe create <name> <url> <width> <height> combined <player>

LOOHP commented

I've added function to create maps for other players.
Here is how it works:
/if create <player>:<name> <url> ...
Added in 1.7.3.1, feel free to give it a try.

Also answered on discord, you can use that to follow up. Closing this for now.