How Can I Put A Join Event In A Command? (Skript) PLEASE HELP!!!

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

  1. I need to make a tablist command where it changes your tablist when the command is done. However, every time I rejoin my Minecraft server, the tablist prefix I have set with my command gets reset. To fix this I need to add the "On join" event on my command, but how do I add it as every time it says It cannot understand this condition/event.

    here is my code, please help:

    Code (Text):
    command /pax [<offline player>] [<text>]:
      permission: paxterya.rankset
      permission message: "&cYou Do Not Have Enough Permissions To Execute This Command"
      trigger:
        set arg-1 tab name to "%colored arg-2% %player%"
        on join:
          set arg-1 tab name to "%colored arg-2% %player%"
     
    please help me. Thank You In Advance.
     
  2. commands != events

    these two are two separate things, you don't put events inside commands or commands inside events

    correct code would be:
    Code (Text):

    command /pax [<offline player>] [<text>]:
      permission: paxterya.rankset
      permission message: "&cYou Do Not Have Enough Permissions To Execute This Command"
      trigger:
        set arg-1 tab name to "%colored arg-2% %arg 1%"
        set {_uuid} to {uuid::%arg 1%}
        set {prefix::%{_uuid}%} to colored arg 2
    on join:

      #saving uuid so it can later be used when the player will be offline

      if {name::%uuid of player%} is set:
        {name::%uuid of player%} is not player's name
        delete {uuid::%{name::%uuid of player%}%}

      #comparing text so if the variable isn't set, there's no need for extra conditions

      "%{uuid::%player%}%" is not uuid of player:
        set {uuid::%player%} to uuid of player
      "%{name::%uuid of player%}%" is not player's name:
        set {name::%uuid of player%} to player's name

      set player's tab name to "%{prefix::%uuid of player%}% %player%"
     
     

  3. Let Me Check This Out But Thank You For Your Help :)