Trying to see if a player sent a command or console! (SOLVED)

Discussion in 'Skript' started by xFadedxShadow, Feb 3, 2020.

  1. # Made by xFadedxShadow

    command /op [<offlineplayer>]:
    trigger:
    make console execute command "/op %arg 1%"
    message "&fYou've set &e%arg 1%&f as an operator!"
    stop trigger

    on command "/op":
    if {rank::%UUID of player%} is not "&8[&9O&bw&9n&be&9r&8]":
    cancel event
    message "&cYou do not have permission to execute this command!"
    else if # Console then execute this command!
     
  2. How can i check if a player sent a command or if console did! with the on command event!
     
  3. you don't need on command, you can include all in the same command /op part, also you are executing /op inside /op, that causes infinite loop and server crash

    there is
    Code (Text):
    sender
    expression in Skript, so you could take advantage of that.