Why can commands made with Scripts run on the console?

Discussion in 'Spigot Plugin Help' started by goldartz, Jun 2, 2017.

  1. Choco

    Moderator

    This must have something to do with Skript not caring about what entity is sending the command. I'm not sure if you can do "sender as Player" in a Skript or anything, but if you can, that's likely the issue. It would help to see what the Skript actually is. I'm just guessing because I haven't touched Skript with a 10ft pole.

    Also, for future reference, it may be beneficial to create threads regarding Skript in its respective forum
     
  2. Probably wrong skript version.
     
  3. Code:
    command /diamond [<text>] [<number>]:
    trigger:
    if player has permission "op":
    if arg-1 is set:
    if arg-2 is set:
    if arg-2 is between 1 and 10000000000:
    if arg-1 is "all":
    send "&cDiamonds> &7You gave &e%arg-2% diamonds &7to &eALL&7."
    loop all players:
    add arg-2 to {diamonds.%loop-player%}
    else:
    send "&cDiamonds> &7You gave &e%arg-2% diamonds &7to &e%arg-1 parsed as offline player%&7."
    add arg-2 to {diamonds.%arg-1 parsed as offline player%}
    else:
    send "&cDiamonds> &7Invalid Diamonds Amount"
    else:
    send "&cDiamonds> &7Missing Args: &e/diamond <player> <amount>"
    else:
    send "&cDiamonds> &7Missing Args: &e/diamond <player> <amount>"
    else:
    send "&cAccess Denied> &eThis requires the Rank [&bADMIN&e]."