Skript commands being used through console

  • Welcome to skUnity!

    Welcome to skUnity! This is a forum where members of the Skript community can communicate and interact. Skript Resource Creators can post their Resources for all to see and use.

    If you haven't done so already, feel free to join our official Discord server to expand your level of interaction with the community!

    Now, what are you waiting for? Join the community now!

  • LOOKING FOR A VERSION OF SKRIPT?

    You can always check out skUnity Downloads for downloads and any other information about Skript!

Status
Not open for further replies.

voxil

Member
Jan 2, 2022
1
0
1
Hello,

I have setup a skript command, and want a java plugin to be able to use it through console. The skript command works fully perfect when used by player or manually typing through console, but when the java plugin tries to run the command through the console it errors and can't recognise the command as a real command. Is there anyway to get skript commands to be recognised as a real command and let java plugins execute them through console.

Here is the command I want to be able to be used through console by a java plugin.

command /setlevel <player> <int>:
permission: setlevel.lol
permission message: No Permission
trigger:
if argument 1 is not set:
send "&eSetlevel:&7 Something is not right?"
stop
if argument 2 is not set:
send "&eSetlevel:&7 Something is not right?"
stop
if argument 2 is equal to {level.%arg-1%}:
stop
else:
if argument 2 is greater than or equal to 25:
set {level.%arg-1%} to arg-2
broadcast ""
broadcast "&c&l%arg-1% is now &4&lLevel %{level.%arg-1%}%"
broadcast ""
else:
set {level.%arg-1%} to arg-2
send "" to arg-1
send "&e&lYou are now &a&lLevel %{level.%arg-1%}%" to arg-1
send "" to arg-1
 
Status
Not open for further replies.