DNAmaster10 / httpRequests

A Spigot plugin which allows player to send HTTP requests to a web server from an ingame command
MIT License
14 stars 3 forks source link

Response handler #6

Closed mvolotov closed 2 years ago

mvolotov commented 2 years ago

Hello! I think it would be great to finish the response handler. I really liked your solution with the JS handler, but I would like to expand its capabilities.

For example, in addition to sending commands to the console, be able to send messages to the player. To do this, you can make a prefix by which the plugin understands what it needs to do, like:

// execute command in server console
return 'command:~' + 'tell ' + sender + ' Hello world!';

// return msg to sender
return 'message:~' + 'Hello world'

:~ - is delimiter, with which you can separate the executed instruction from the returned text. The handler itself can be a simple java switch.

DNAmaster10 commented 2 years ago

I like this idea. Would you be able to suggest any other functions, such as the message function, which i could implement with the next update? Thanks :)