1. Welcome to skUnity!

    Welcome to skUnity! This is a forum where members of the Skript community can communicate and interact. Skript Resource Creators can post their Resources for all to see and use.

    If you haven't done so already, feel free to join our official Discord server to expand your level of interaction with the comminuty!

    Now, what are you waiting for? Join the community now!

Dismiss Notice
This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Script SafeTrade 1.3

Great player to player safe item trading script.

  1. AsuDev
    Supported Minecraft Versions:
    • 1.10, 1.11, 1.12, 1.13


    SafeTrade is a script that makes trading items between players easy and simple.

    - Safe and simple way for people to trade items
    - Configurable messages
    - Inventory checker for full inventory
    - Creative mode option
    - Configurable trade cool down and trade time out
    - Configurable distance and same world checker
    - Configurable countdown timer when trading for safety
    - Configurable sounds for specific functions
    - Configurable GUI items
    - Blacklist items based on name, lore, item type, or exact item

    - /trade [<player>] - Request a trade / Accept a trade
    - /tradetoggle - Enable or disable trading
    - /tblacklist [<create,remove,set>] [<id>] - Create blacklist ids (Edit in blacklist.yml)
    - /treload - Reload the config of the script

    - trade.use (for /trade and /tradetoggle)
    - trade.reload (for /treload)
    - trade.blacklist (for /tblacklist)

    Blacklisting Guide
    When you first load up the file, a blank blacklist.yml file will be created. I recommend not editing this file when it is empty.
    1. To make a blacklist item, you have to create it using the '/tblacklist create <id>' command. The <id> can be anything you want.
    2. After using the create command, it will be created in the blacklist.yml file. You can then go change the settings for that id.
    3. To set an exact item, hold an item that is not air in your hand and use command '/tblacklist set <id>'. This will make it to where whatever you are holding cannot be traded.
    4. Make sure to read the top of the blacklist.yml for directions on what options do what. After you create your first blacklist id, the directions will generate.

    Required Plugins
    Skript Bensku fork 2.3.6: https://github.com/SkriptLang/Skript/releases
    SkQuery fork: https://www.spigotmc.org/resources/unofficial-skquery-fork-1-6-1-12.36631/
    Skellett: https://www.spigotmc.org/resources/skript-java-addon-skellett.34361/
    Skript-Yaml: https://www.spigotmc.org/resources/skript-yaml.49829/

    1. Drop all the plugins above into plugins folder and restart server.
    2. Download this resource (trade.sk) and put it in the plugins/Skript/scripts folder
    3. You can either restart the server again or do /sk reload trade
    4. Your done!

    Extra Information
    1. To put items up for trade, you have to shift click the items. There is a reason for this and I will not change it.
    2. Feel free to edit the script's source code to your liking but do not claim it as your own.
    3. I will most likely not add economy support to this. If you want to have eco with this trade, then either make a physical currency or use a plugin that allows you to convert virtual currency to physical currency.
    4. Here is my discord if you have any questions or need help: AsuDev#0714



    Code (YAML):
    3. Messages:
    4.     Prefix: '&8&l[&e&lTRADING&8&l]'
    5.     TradeNoPermission: '{prefix} &cYou do not have permission to trade.'
    6.     TradeToggleDisabled: '{prefix} &cYou disabled trading.'
    7.     TradeToggleEnabled: '{prefix} &aYou enabled trading.'
    8.     BlacklistedIDExists: '{prefix} &7The blacklisted item id you specified already
    9.         exists.'
    10.     BlacklistedIDDoesNotExist: '{prefix} &7The blacklisted item id you specified does
    11.         not exist.'
    12.     BlacklistedItem: '{prefix} &7That item cannot be traded.'
    13.     BlacklistedIDCreated: '{prefix} &7You &acreated &7a blacklist id called &6{id}&7.
    14.         To edit this, you have to edit the &ablacklist.yml &7file.'
    15.     BlacklistedIDRemoved: '{prefix} &7You &cremoved &7the blacklist id called &6{id}&7.'
    16.     BlacklistedIDExactItem: '{prefix} &7You &3set &7the exact item of blacklist id
    17.         called &6{id} &7to your held item.'
    18.     TradeSelf: '{prefix} &7Yeah, because I would definitely allow you to trade yourself.'
    19.     TradeCooldown: '{prefix} &7Please wait a few seconds before using this command
    20.         again.'
    21.     PlayerHasTradingDisabled: '{prefix} &7The player you specified has trading disabled.'
    22.     NoTradeInCreative: '{prefix} &7You cannot trade in creative mode.'
    23.     NoTradeInCreative2: '{prefix} &7The other player is in creative mode.'
    24.     NotSameWorld: '{prefix} &7You must be in the same world as the specified player
    25.         to trade them.'
    26.     OutOfDistance: '{prefix} &7You are too far away from the specified player to trade
    27.         them.'
    28.     AlreadyInTrade: '{prefix} &7The other player is already currently in a trade.'
    29.     RequestAlreadySent: '{prefix} &7You already sent this player a trade request...'
    30.     ClickCorrection: '{prefix} &7Shift click items in your inventory to put up trade
    31.         offers.'
    32.     GuiName: '&a★You★              &c★Other★'
    33.     RequestSent: '{prefix} &7You sent a trade request to &6{target}&7.'
    34.     TradeCanceled: '&8&l[&4✘&8&l] &cThe other player canceled the trade. &8&l[&4✘&8&l]'
    35.     TradeCanceled2: '&8&l[&4✘&8&l] &cYou canceled the trade. &8&l[&4✘&8&l]'
    36.     TradeAccepted: '&8&l[&a✔&8&l] &bTrade complete. &7Please report any scams! &8&l[&a✔&8&l]'
    37.     TradeReloaded: '{prefix} &aThe trade config has been reloaded.'
    38.     RequestReceived: '{prefix} &6{player} &7sent you a trade request. Use &a/trade
    39.         {player} &7to accept it.'
    41. # Does /trade have a cooldown? Put true or false
    42. # Cooldown duration in seconds
    43. TradeCooldown:
    44.     Enabled: true
    45.     Timer: 5
    47. # The timout duration of a trade offer
    48. # The countdown of trade ending
    49. # Cooldown duration in seconds
    50. # Do players have to be in same world to trade
    51. # Distance limit for trading (Set to Infinite for no limit)
    52. # Should players be able to trade in creative? true/false
    53. Trade:
    54.     TimeOut: 20
    55.     CountDown: 6
    56.     SameWorld: true
    57.     Distance: Infinite
    58.     TradeInCreative: false
    60. # Sound played when adding an item to a trade
    61. # Is this sound enabled? Put true/false
    62. # The name of the sound played
    63. # How loud the played sound is
    64. # The pitch of the sound played
    65. # Sounds found at: https://hub.spigotmc.org/javadocs/spigot/org/bukkit/Sound.html
    66. AddOffer:
    67.     PlaySound: true
    69.     Volume: 1
    70.     Pitch: 1
    72. # Sound played when the trade is successful
    73. # Is this sound enabled? Put true/false
    74. # The name of the sound played
    75. # How loud the played sound is
    76. # The pitch of the sound played
    77. # Sounds found at: https://hub.spigotmc.org/javadocs/spigot/org/bukkit/Sound.html
    78. TradeComplete:
    79.     PlaySound: true
    80.     SoundName: ENTITY_PLAYER_LEVELUP
    81.     Volume: 1
    82.     Pitch: 1
    84. # Sound played when the trade is not successful
    85. # Is this sound enabled? Put true/false
    86. # The name of the sound played
    87. # How loud the played sound is
    88. # The pitch of the sound played
    89. # Sounds found at: https://hub.spigotmc.org/javadocs/spigot/org/bukkit/Sound.html
    90. TradeCanceled:
    91.     PlaySound: true
    92.     SoundName: BLOCK_ANVIL_LAND
    93.     Volume: 1
    94.     Pitch: 0.1
    96. # The gui item for Not Ready (DO NOT SET TO AIR)
    97. NotReady:
    98.     ItemID: gray dye
    99.     Name: '&7Not Ready...'
    100.     Lore:
    101.    - Empty
    103. # The gui item for Ready (DO NOT SET TO AIR)
    104. Ready:
    105.     ItemID: lime dye
    106.     Name: '&a&lREADY'
    107.     Lore:
    108.    - Empty
    110. # The gui item for Accept Trade button (DO NOT SET TO AIR)
    111. Accept:
    112.     ItemID: green stained glass pane
    113.     Name: '&a&lACCEPT TRADE'
    114.     Lore:
    115.    - '&7&oClick to accept trade.'
    117. # The gui item for Cancel Trade button (DO NOT SET TO AIR)
    118. Cancel:
    119.     ItemID: red stained glass pane
    120.     Name: '&4&lCANCEL TRADE'
    121.     Lore:
    122.    - '&7&oClick to cancel trade.'
    124. # The gui item for Divider line (DO NOT SET TO AIR)
    125. Divider:
    126.     ItemID: iron bars
    127.     Name: '&4'
    128.     Lore:
    129.    - Empty
    131. # The gui item for Stop Timer item (DO NOT SET TO AIR)
    132. StopTimer:
    133.     ItemID: barrier
    134.     Name: '&c&lSTOP TIMER'
    135.     Lore:
    136.    - '&7&oClick to stop the timer.'
    138. # The gui item for Blank Slot item (DO NOT SET TO AIR)
    139. BlankSlot:
    140.     ItemID: light gray stained glass pane
    141.     Name: '&4'
    142.     Lore:
    143.    - Empty


    Code (YAML):
    1. ## This is the item blacklist for trading.
    2. ## Use /tblacklist <create,remove,set> <id> for managing the item blacklist.
    3. ##
    4. ## Detection Types:
    5. ##   'Name' = Detect blacklisted item by name (For DetectionType Option)
    6. ##   'Lore' = Detect blacklisted item by lore (For DetectionType Option)
    7. ##   'Both' = Detect blacklisted item by name and lore (For DetectionType Option)
    8. ##   'Type' = Detect blacklisted item by item type (For DetectionType Option)
    9. ##   'ExactItem' = Detect blacklisted item by exact item (For DetectionType Option)
    10. ##
    11. ## Text Detection Types:
    12. ##   'Contains' = If name of blacklisted item CONTAINS certain text (For TextDetectionType Option) Does not work with lore.
    13. ##   'Is' = If name or lore of blacklisted item IS certain text (For TextDetectionType Option)
    14. ##
    15. ## ItemName = The text to find in the name of a item (Applies when DetectionType is set to 'Name' or 'Both')
    16. ## ItemLore = The text to find in the lore of a item (Applies when DetectionType is set to 'Lore' or 'Both'
    17. ## ItemType = The item type of the item you want to blacklist (Applies when DetectionType is set to 'Type')
    18. ## ExactItem = Detection for an exact item (Applies when DetectionType is set to 'ExactItem'. To set an exact item, use /tblacklist set <id>)
    20. '1':
    21.     DetectionType: Name
    22.     TextDetectionType: Contains
    23.     ItemName: '&dGod Sword'
    25. '2':
    26.     DetectionType: Lore
    27.     TextDetectionType: Contains
    28.     ItemLore: '&7&oUntradeable...'
    30. '3':
    31.     DetectionType: Both
    32.     TextDetectionType: Contains
    33.     ItemName: '&cForbidden Item'
    34.     ItemLore: '&7&oThis item cannot be traded.'
    36. '4':
    37.     DetectionType: Type
    38.     ItemType: 'diamond sword'
    40. '5':
    41.     DetectionType: ExactItem
    42.     ExactItem:
    43.         ==: org.bukkit.inventory.ItemStack
    44.         type: DIAMOND_SWORD
    45.         meta:
    46.             ==: ItemMeta
    47.             meta-type: UNSPECIFIC
    48.             display-name: §bBlargghhh
    49.             lore:
    50.            - §9Trolls use this weapon...

Recent Updates

  1. 1.13 Support
  2. Fixed Important Bug
  3. Bug Fixes, Item Blacklisting