Skript Version: Skript 2.2 (dev24b)
Skript Author: Bensku
Minecraft Version: 1.11.2
---
In my script (below, but note that it is not finished so there are probably many issues) I have created a new help command. From what I can see, where it should filter it does not. My server uses PEX for permissions and in certain worlds the player has differnt permissions than in others. Correct me if I am wrong, but the "if player has permission" is in all worlds, not only the one they are in. Is there any way I can resolve this? Thanks.
Full Code:
Errors on Reload:
None
Console Errors: (if applicable)
None
Addons using (including versions): SkQuery 3.5.8-Lime, skUtilities 0.8.8, ExertSK 1.3b, Skellett 1.9.4a, SharpSK 1.6.1.2, TuSKe 1.7.6, skRayFall 1.9.7
Troubleshooting:
Have you tried searching the docs? Yes
Have you tried searching the forums? Yes
What other methods have you tried to fix it? None
Skript Author: Bensku
Minecraft Version: 1.11.2
---
In my script (below, but note that it is not finished so there are probably many issues) I have created a new help command. From what I can see, where it should filter it does not. My server uses PEX for permissions and in certain worlds the player has differnt permissions than in others. Correct me if I am wrong, but the "if player has permission" is in all worlds, not only the one they are in. Is there any way I can resolve this? Thanks.
Full Code:
code_language.skript:
on load:
if file "plugins/HelpPage/Config.yml" doesn't exist:
create file "plugins/HelpPage/Config.yml"
set yaml value "Settings.Commands-Per-Page" from file "plugins/HelpPage/Config.yml" to 9
set yaml value "Settings.Header" from file "plugins/HelpPage/Config.yml" to "&e ---- &6Help &e-- &6Page &c{PAGE}&6/&c{TOTAL} &e----"
set yaml value "Settings.Footer" from file "plugins/HelpPage/Config.yml" to "&6Type &c/help {NEXTPAGE} &6to read the next page."
stop trigger
command /help [<text>]:
trigger:
set {_all::*} to all commands
loop {_all::*}:
set {_perm} to the permission of command "%loop-value%"
if player has permission "%{_perm}%":
send "%{_perm}%"
set {_desc} to the description of command "%loop-value%"
set {_commands::%loop-value%} to "%{_desc}%"
add 1 to {_num}
if yaml path "Settings.Commands-Per-Page" in file "plugins/HelpPage/Config.yml" does not exist:
set yaml value "Settings.Commands-Per-Page" from file "plugins/HelpPage/Config.yml" to 9
set {_commandsPerPage} to yaml value "Settings.Commands-Per-Page" from file "plugins/HelpPage/Config.yml"
if yaml path "Settings.Header" in file "plugins/HelpPage/Config.yml" does not exist:
set yaml value "Settings.Header" from file "plugins/HelpPage/Config.yml" to "&e ---- &6Help &e-- &6Page &c{PAGE}&6/&c{TOTAL} &e----"
set {_header} to yaml value "Settings.Header" from file "plugins/HelpPage/Config.yml"
if yaml path "Settings.Footer" in file "plugins/HelpPage/Config.yml" does not exist:
set yaml value "Settings.Footer" from file "plugins/HelpPage/Config.yml" to "&6Type &c/help {NEXTPAGE} &6to read the next page."
set {_Footer} to yaml value "Settings.Footer" from file "plugins/HelpPage/Config.yml"
set {_pages} to {_num} / {_commandsPerPage}
if "%{_pages}%" contains ".":
set {_pages} to ("%{_pages}%" parsed as int) + 1
if arg 1 is not set:
send "%{_header}%"
loop {_commands::*}:
if "%{_loop}%" is not "%{_commandsPerPage}%":
add 1 to {_loop}
send "/%loop-index%: %loop-value%"
else:
send "%{_footer}%"
stop trigger
Errors on Reload:
None
Console Errors: (if applicable)
None
Addons using (including versions): SkQuery 3.5.8-Lime, skUtilities 0.8.8, ExertSK 1.3b, Skellett 1.9.4a, SharpSK 1.6.1.2, TuSKe 1.7.6, skRayFall 1.9.7
Troubleshooting:
Have you tried searching the docs? Yes
Have you tried searching the forums? Yes
What other methods have you tried to fix it? None