Sueta
FR

Friends

1.2

Allows you to add, remove, list, etc friends which can also be used as a sort of gang skript.

·Script

Introduction to the skript:
This skript was created to give players a way to create gangs within friendship. This skript is easy to edit within the config section with descriptions of every node that you can customize. You can enable and disable permissions for two parts of the skript, toggle and block, which is great for VIP members.

Friends on your list cannot hurt you, you or your friend can remove the other from their friend list at any time. To protect yourself from unfaithful you can add the player to your blocked players list which will deny any request they send you. To reduce spam, you can toggle friend requests with one simple command.

This skript can keep a log of all added and removed friends for all players with a simple change of an option, in the config, you can set "log:" to true or false to enable or disable logs.

Installation:
This skript only requires skript and no addons.
You will need to install Skript and restart your server, this will create the "scripts" folding within the "Skript" folder. You will then have to put the "friends.sk" file into the folder. Use "/sk reload friends" to reload the skript after editing the config section and your finished.

Permission Nodes:
friends.use - access to the friends commands.
friends.toggle - access to the toggle requests.
friends.block - access to block players.

Commands:
/friends add <player> - To send a request or not accept a request.
/friends remove <player> - To remove a player from your friends list.
/friends list <player> - To list how many friends you have and who they are or specify a player to list their friends.
/friends block <player> - Toggle a player from sending you friend requests.
/friends toggle - Toggle receiving friend requests.
/friends chat - Toggle friends chat on and off. (Use chat to send messages)

Config Section
# This is the config section you can edit
# to make the skript fit your server.
# REMINDER:  %arg-2% is replaced with <player> in the command... e.g - /friends add 3asel - You have sent a friend request to 3asel.

    permission: friends.use                                              # The permission node needed to use the friends skript.
    pmessage: &cYou do not have access to this command.                  # If they do not have the permission node.
    log: false                                                           # Set to "true" or "false" to enable or disable log, default is disabled.
 
    block: false                                                         # Do you want "/friends block" to be permission based, default is disabled. (don't give the perm to disable command)
    blockperm: friends.block                                             # Permission to use the block command.
    toggle: false                                                        # Do you want "/friends toggle" to be permission based, default is disabled. (don't give the perm to disable command)
    toggleperm: friends.toggle                                           # Permission to use the block command.
 
    max: 10                                                              # The max amount of friends the player can have.
    maxmessage: &cYou can only have 10 friends.                          # If they have the max friends.
 
    chatformat: &2FChat &7(from %player%) &a%message%                    # Friends chat format. %player% will be replaced with the message sender. %messages% will be replaced by the message.
    chaton: &aYou have &nenabled&a friends chat.                         # When you toggle friends chat on.
    chatoff: &aYou have &c&ndisabled&a friends chat.                     # When you toggle friends chat off.
 
    requestsent: &cYou have already sent %arg-2% a request.              # If they have already sent <player> a request.
    friendsoff: &c%arg-2% has friend requests turned off.                # If <player> has friends turned off.
    requestself: &cYou cannot friend yourself.                           # Cannot friend yourself.
    alreadyfriends: &cThis player is already a friend.                   # If <player> is already a friend.
    notfriendsme: &cYou are not friends with yourself.                   # Cant remove yourself from your friends list.
    notfriends: &cThey are not a friend.                                 # If <player> is not a friend (when removing friends).
    acceptme: &aYou have accepted %arg-2%'s friend request.              # The message sent to player when request is accepted.
    acceptarg: &2%player% has accepted your friend request.              # The message sent to <player> when request is accepted.
    sentme: &aYou have sent a request to be friends with %arg-2%.        # The message sent to player when request is created.
    sentarg: &2%player% has sent you a friend request.                   # The message sent to <player> when request is created.
    offline: &cThis player is offline.                                   # If <player> is offline and cant be sent a request.
    removedme: &aYou are no longer friends with %arg-2%.                 # The message sent to player when they are no longer friends with <player>.
    removedarg: &2%player% has removed you as a friend.                  # The message sent to <player> when they are no longer friends with player.
    toggleoff: &aYou have turned off friend requests.                    # Turned friend requests off.
    toggleon: &aYou have turned on friend requests.                      # Turned friend requets on.
 
    blockadd: &aYou have blocked %arg-2%'s requests.                     # Blocked <player> from sending you requests.
    blockremove: &aYou have unblocked %arg-2%'s requests.                # Unblocked <player> from sending you requests.
    youreblocked: &cYou cannot send this player a friend request.        # If player is on <player>'s blocked list.
    cantblock: &cYou cannot block friends.                               # If <player> is a friend.
    blockme: &cYou cannot block yourself.                                # If <player> if the player.
    offlineblock: &cCannot block offline players.                        # If <player> is offline.
 
    friendswith: &aYou are friends with...                               # When listing your friends.
    friendswitharg: &a%arg-2% is friends with...                         # When listing <player>'s friends.
    nofriends: &cYou do not have any friends.                            # You have no friends.
    nofriendsarg: &c%arg-2% has no friends.                              # <player> has no friends.
    maxcolour: &2                                                        # The colour of the amount of friends.
    listcolour: &7                                                       # The colour of the list of friends.
 
    attack: &cYou cannot attack your friends.                            # When a friend attacks a friend.

# Only chance this if you need to - this is layed out to be simple to
# understand. This section is for the log config.

    logaddme: ADD :: %player% added %arg-2% as a friend" in "friends                       # Add log for command executor
    logaddarg: ADD :: %arg-2% was added to %player%'s friends list" in "friends            # Add log for <player>
    logremoveme: REMOVE :: %player% removed %arg-2% as a friend" in "friends               # Remove log for command executor
    logremovearg: REMOVE :: %arg-2% was removed from %player%'s friends list" in "friends  # Remove log for <player>

Future Ideas: [Feel free to add suggestions in reviews]
Permission based max friends (allow ranks to have more friends than defaults)

Downloads:
10
25
50

100

Similar projects

Script →