on load: if file "plugins/CMDS/cmds.yml" doesn't exists: create file "plugins/CMDS/cmds.yml" wf "## Use: ##" to "plugins/CMDS/cmds.yml" wf "## Per one command ##" to "plugins/CMDS/cmds.yml" wf "## [TAB]CommandName: ##" to "plugins/CMDS/cmds.yml" wf "## [TAB][TAB]permission: NEEDEDPERMISSION" to "plugins/CMDS/cmds.yml" wf "## [TAB][TAB]permissionmes: '&7Sorry bro :('" to "plugins/CMDS/cmds.yml" wf "## [TAB][TAB]messages: ##" to "plugins/CMDS/cmds.yml" wf "## [TAB][TAB]- 'MESSAGE' ##" to "plugins/CMDS/cmds.yml" wf "## [TAB][TAB]todo: [...] ##" to "plugins/CMDS/cmds.yml" set "cmds.FirstCommand.messages" to "'[...]'" in yaml file "plugins/CMDS/cmds.yml" set "cmds.FirstCommand.todo" to "'[...]'" in yaml file "plugins/CMDS/cmds.yml" execute console command "cmdl" command /cmdl: trigger: if file "plugins/CMDS/cmds.yml" exists: set {_l::*} to configuration section "cmds" get of "plugins/CMDS/cmds.yml" clear {cmd::*} loop {_l::*}: add loop-value to {cmds::*} set {cmd::%loop-value%::message::*} to value list "cmds.%loop-value%.messages" get of "plugins/CMDS/cmds.yml" set {cmd::%loop-value%::todo::*} to value list "cmds.%loop-value%.todo" get of "plugins/CMDS/cmds.yml" set {cmd::%loop-value%::permission} to single value "cmds.%loop-value%.permission" get of "plugins/CMDS/cmds.yml" set {cmd::%loop-value%::permissionmes} to single value "cmds.%loop-value%.permissionmes" get of "plugins/CMDS/cmds.yml" send "Zaladowano" else: send "&7Nie wykryto folderu z configiem!" on command: loop {cmds::*}: if command is loop-value: cancel event if player has permission "%{cmd::%loop-value%::permission}%" or "cmds.*": loop (size of {cmd::%loop-value%::message::*}) times: set {_m} to "%coloured {cmd::%loop-value%::message::%loop-number%}%" replace all "PLAYER" in {_m} with "%player%" replace all "TIME" in {_m} with "%now%" send "%{_m}%" loop (size of {cmd::%loop-value%::todo::*}) times: set {_todo} to {cmd::%loop-value%::todo::%loop-number%} set {_x::*} to {_todo} split at ":" if {_x::1} is "broadcast": set {_to} to "" loop (size of {_x::*}) times: if loop-number-2 is not 1: set {_to} to "%{_to}%%{_x::%loop-number-2%}%" set {_m} to coloured {_to} replace all "RANDOMC" in {_m} with "&1" or "&2" or "&3" or "&4" or "&5" or "&6" or "&7" or "&8" or "&9" or "&0" or "&a" or "&b" or "&c" or "&d" or "&e" or "&f" replace all "PLAYER" in {_m} with "%player%" replace all "COMMAND" in {_m} with "%command%" broadcast "%{_m}%" if {_x::1} is "executeconsole": execute console command "%{_x::2}%" if {_x::1} is "executeplayer": execute player command "%{_x::2}%" stop else: set {_m} to "%{cmd::%loop-value%::permissionmes}%" replace all "RANDOMC" in {_m} with "&1" or "&2" or "&3" or "&4" or "&5" or "&6" or "&7" or "&8" or "&9" or "&0" or "&a" or "&b" or "&c" or "&d" or "&e" or "&f" replace all "NPERM" in {_m} with "%{cmd::%loop-value%::permission}%" send "%{_m}%" stop