KOTH icon indicating copy to clipboard operation
KOTH copied to clipboard

Commands for loot not working.

Open HubertGrootenboer opened this issue 6 years ago • 1 comments

Hi, I'm trying to add commands for the loot prices but everytime I add something and reload the plugin, the loot.json file reset itself. Also, due to the way you need to write the command, something like this is impossible to do: [ { "name": "test", "items": {}, "commands": [ "0": "tellraw %player% ["",{"text":"Tu as gagné deux ","color":"dark_gray"},{"text":"clefs de vote","bold":true,"color":"green"},{"text":"!","bold":true,"color":"dark_gray"}]" ] } ] (the indentation is correct) The command won't be executed due to the " in the command itself. Thank you for the help.

HubertGrootenboer avatar Apr 06 '18 00:04 HubertGrootenboer

You need to escape your "" 's by putting a \ befote it, so["", "text": etc. etc.

Make sure you let your config go through a JSON validator: https://jsonlint.com

If it keeps resetting anyway, it might be because KoTH saves its config when it unloads. Trying disabling koth or stop the server then put in the config, then enable/start the server again

SubSide avatar Apr 06 '18 08:04 SubSide