Skip to content
home/templates/party / team system
utilityAdvancednewmc 1.20.x – 1.21.x53 lines

party / team system

players form parties: /party create, /party invite, /partychat, /party tp. friendly-fire is disabled within a party.

vanilla Skriptno addons required.
party-system.sk53 lines
command /party <text> [<player>] [<text>]:
    aliases: /p
    trigger:
        if arg-1 is "create":
            if {party.leader.%uuid of player%} is set:
                send "&cYou're already in a party." to player
                stop
            set {party.leader.%uuid of player%} to player
            add player to {party.members.%uuid of player%::*}
            send "&aParty created. Use &e/party invite <player>&a to add members." to player
        else if arg-1 is "invite":
            if {party.leader.%uuid of player%} is not player:
                send "&cYou must be the party leader." to player
                stop
            send "&e%player% &ainvited you to their party. &7Run &e/party accept &7to join." to arg-2
            set {party.invite.%uuid of arg-2%} to player
        else if arg-1 is "accept":
            set {_leader} to {party.invite.%uuid of player%}
            if {_leader} is not set:
                send "&cNo pending invites." to player
                stop
            add player to {party.members.%uuid of {_leader}%::*}
            set {party.leader.%uuid of player%} to {_leader}
            delete {party.invite.%uuid of player%}
            loop {party.members.%uuid of {_leader}%::*}:
                send "&a%player% &fjoined the party." to loop-value
        else if arg-1 is "leave":
            set {_leader} to {party.leader.%uuid of player%}
            remove player from {party.members.%uuid of {_leader}%::*}
            delete {party.leader.%uuid of player%}
            send "&7You left the party." to player

command /partychat <text>:
    aliases: /pc
    trigger:
        if {party.leader.%uuid of player%} is not set:
            send "&cYou're not in a party." to player
            stop
        loop {party.members.%uuid of {party.leader.%uuid of player%}%::*}:
            send "&d[Party] &f%player%&7: &r%arg-1%" to loop-value

on damage:
    if attacker is a player:
        if victim is a player:
            # Both must have a leader SET — otherwise <none> = <none> would
            # cancel damage between two unrelated strangers (real bug from
            # an earlier revision). Guard with "is set" first.
            if {party.leader.%uuid of attacker%} is set:
                if {party.leader.%uuid of victim%} is set:
                    if {party.leader.%uuid of attacker%} is {party.leader.%uuid of victim%}:
                        cancel event
                        send "&7&oFriendly fire blocked." to attacker

get it running

party-system.sk · 53 lines · vanilla Skript
  1. 1

    copy or download

    grab the .sk file with the buttons up top.

    party-system.sk· ready to drop in
  2. 2

    drop it in your scripts folder

    save it exactly here on your server — no typos, just copy the path:

    …/plugins/Skript/scripts/party-system.sk
  3. 3

    reload in-game

    run this in chat or console — your script goes live instantly:

    /sk reload party-system
that's it — your script is live. hop in-game to try it.
/ related templates

more utility templates

comments