TheoKah / CarrotShop

SignShop for Sponge
MIT License
16 stars 15 forks source link

Added [cmd] commands to manage command files from within the server. #62

Open shinyafro opened 5 years ago

shinyafro commented 5 years ago

Added some commands to manage the commandsigns commands. /cs cmd set Sets a commandsign command. Will create or edit a text file with said content in the commandsign folder basically /cs cmd remove deletes a text file in the command directory /cs cmd link [name] links a command, so you can click a commandsign with a stick to change the signs command to the one linked when used without a name, will unlink the command, freeing you to cycle currencies. /cs cmd list lists all the text files in the cmd dir. has a link and delete button you can press.

Basically a project i did for fun to learn java (First time using the language, tbh) Originally was going to see if i could convert the storage sources to include some modded ones but sponge doesn't natively support it yet apparently, Oof. Feel free to add it, modify or reject it. Honestly probs not that secure then again commandsigns run from console anyway so its really just for owners..

TheoKah commented 5 years ago

As commands are run with console permissions, my original idea was to prevent anyone without console/file access to setup cmd signs.

I'm open to discussion

shinyafro commented 5 years ago

All good. I just figured it would be interesting to be able to give admins the ability to link signs, so they can for example move a command sign if they want to restructure spawn without actually being able to edit the content, and give the commands human readable names / have multiple signs execute the one command, etc. Plus some owners would give console access (Like discord magibridge/commandblocks) but not file access for whatever reason.