FairTrade [1.12 - 1.16.1] 3.2

A secure & customizable way to trade items, support Vault, xp Trading, totally customizable layout

  1. Rafoudiablol
    Native Minecraft Version:
    1.16
    Tested Minecraft Versions:
    • 1.12
    • 1.13
    • 1.14
    • 1.15
    • 1.16
    Source Code:
    https://github.com/Eren121/FairTrade
    Languages Supported:
    [en] & translatable

    [​IMG]

    [​IMG]

    v3.1.PNG

    ignore-list.png

    Changelog
    Code (Text):

    Minecraft Version                  Latest compatible FairTrade version
    1.16.1                             3.2
    1.15.2                             3.1
    1.14.4                             2.4.1
    1.13.2                             2.4.1
    1.13.1                             2.2
    1.13                               2.2
    1.12                               1.1
     
    Update to 1.16. Straightforward no api-change. The version change to differs the two version, but the only change is the api-version in plugin.yml and mark the stop of 1.15 support. The 3.1 version is the last version to support 1.15.

    But apparently, the older version are usable with no change in 1.16... But this is probably not stable.

    Add the possibility to ignore others people in another new plugin, FairTradeIgnore, that is totally optional and that you can remove whith no problem from your plugin folder. You will just not be able to ignore people.

    Stable release for version 3.x.

    • Fix a minimal bug (could even be fixed by editing permissions), that prevent players to trade due to wrong permissions. [config file change]
    • Better default layout (more accurate example but mostly more real-life useful layout) [config file change]
    • Add a permission for self-trading, useless but uselful to test, debug and preview the layout.
    • Support now drop click event on the GUI
    • More messages translatables
    • Set some of the messages for more readability
    • Rename the item layout "experience" to "resource", because it's the same used for currency and experience trading.
    • Stable release (the previous was new code), mostly bug fixes.

    • Update to 1.15.2 (api-version 1.15, probably compatible with 1.15)
    • Support to customize items in the Layout
    • Support to trade experience.
    • Total Code rewamp from Scratch: due to that, trading log is momentarily unavalaible. This rewrite should allow more stability over time and probably more features
    • Prevent players to pick up item when they are trading (to prevent not enough place and item drop if they close suddenly the GUI)
    • The trade is not confirmable if the player has not enough place in his inventory to get the other player's items.

    • Remove a listened event (It was for testing serialization of items)
      • It can also make performance better, esecially when players drop items.
    • Backward compatiblity to 1.13: the 1.14 server apparently accepts 1.13 plugins and the plugin does not uses the incorporated features of the 1.14.

    • Typography in french translation
    • The name of some items in the GUI are now empty
    • Fix major bug (players could achieve to deposit items in the remote slots).
    • Updated to API version 1.14 (tested with 1.14.4)
    • Bugfix: Player now should be able to trade money
    Actually version 2.3 is version 2.2, because version 2.2 was named 2.1b

    • API version 1.13.1
    • Better database scheme
    • API version 1.13
    • Vault support, also trade with money is now allowed (tested with TNE). Backup & erase your trading.txt to get the update.
    • Chat clickable after getting a trade request to accept
    • When players change their offer, now the confirmation is reseted.
    • The GUI are automatically closed

    • API version 1.13.1 only
    • PREFIX message editable
    • API version 1.13 (1.12 still supported)
    • Self-trade disabled by default
    • Items in "log" container are now not selectable​

    Overview



    FairTrade allows you to trade items between players and be sure it is fair, like in most MMO (like dofus, diablo or world of warcraft) with a customizable GUI.


    Functionalities & Qualities



    It exists lot of plugins, that will do that... But this one is in 1.15!
    • Secure trade
    • Easely customizable interface + customizable messages
    • Maximum distance configurable

    Secure trade

    • Prevent players to pick up item when they are trading (to prevent not enough place and item drop if they close suddenly the GUI)
    • The trade is not confirmable if the player has not enough place in his inventory to get the other player's items.
    • The confirmation cancel if any of the player change his offer to prevent scams.
    • The check for distance/same world are done at the begining and at the end of the trade, so if any of the playe move during the trade and the trade should not be longer possible, they adequacy will not be able to finalize the trade, unless they go back to allowed conditions. (the GUI do not close if they go into unallowed conditions, but they will not be able to trade.).
    • The GUI is securized, so some actions are forbidden by default but a maximum is done to allow some special clicks.
    • Due to code rewamp, the log history is no longer available but will be better in near future.
    • When a player want to trade, a waiting GUI opens for him so spam should handicap also the spammer, this should prevent spams as most as possible and avoid some unwanted side effects.
    • When to player send a /trade command to each other, they are automatically matched. The clickable text is just an alternative to /trade, that is managed automatically.
    Commands
    • /trade <player>

    Ignore
    module

    • /tradeignore add <player>
    • /tradeignore remove <player>
    • /tradeignore list
    • /tradeignore list <player>
      • require permission fairtrade.ignore.listany

    If two players trade each other, the trade will automatically begin.
    Otherwise, awaiting GUI will invite the player to wait until the other player accepts by clicking on the button "Accept" or entering himself a /trade command.

    Permissions

    • fairtrade.trade
      • description: Allow to trade
      • default: all
    • fairtrade.self
      • description: Allow to trade with yourself (admin for preview)
      • default: op

    Ignore module

    • fairtrade.ignore.listany
      • description: Allow to see not only his own ignore-list, but the ignore-list of any player (last argument to /tradeignore list)
      • default: op
    GUI




    [​IMG]



    (old version, similar)
    • Left slots are what you give
    • Right slots are what you receive (unmodifiable)
    • Wool each side is for player confirm status.
    • The book is confirm/cancel button.
    • Warning: some actions (shift-click, double click, or long click are unusable for security.
    • Currency and experiences buttons are modifiable by left click (add), right click (less) and shift to set more.

    Bug Report


    Please tell in comment if you discover a new bug.


    Basic Configuration


    Code (YAML):
    # max distance for trading
    max-trade-distance
    : 10.0

    # All messages are located in "lang/lang_**.yml" (ie. "lang/lang_en.yml")
    lang
    : en

    # Allow cross-world trading (automatically false if maximum-distance > 0)
    cross-world
    : false

    # The maximum distance to trade. Set to any non-positive value to allow any distance
    maximum-distance
    : 12

     

    All or most messages are modifiable (except errors).
    Some are not yet but it's in work (please tell if you want that some message will be translatable / something was missing / some translation does not work.
    You can save a custom set of messages (ie. localization) into a .yml file into the lang/ folder.


    More Configuration



    To customize the interface, modify file layout.yml
    The list layout is a representation of the ingame-GUI.
    The items itselves can be set in the path items. If you manipulate often Items, you should know the syntax. What you probably would like to change is the material (some lists are avalaible in the internet), but you can also change the lore, the name of the items, almost anything.

    Code (Text):


    # Each line of "layout" is a line of the GUI
    # Each value between comma is a slot
    # "~X" where X is a number are local slots (modifiable).
    # "#X" where X is a number are remote slots (unmodifiable).
    # Each number is linked between remote/local, and there should not be orphan slots.
    # "~ST" represents local status (if the player has confirmed or not)
    # "#ST" represents remote status.
    # "NOP" is an empty slot.
    # "TOG" is the button to toggle confirm/cancel
    # "CUR" is the button to trade Vault currency.
    # "EXP" is the button to trade experience
    layout:
    - ~01,~02,~03,~ST,TOG,#ST,#01,#02,#03
    - NOP,NOP,NOP,NOP,EXP,NOP,NOP,NOP,NOP
    items:
      ==: fr.rafoudiablol.fairtrade.layout.Skins
      confirm:
        ==: org.bukkit.inventory.ItemStack
        v: 2230
        type: WRITABLE_BOOK
      level:
        ==: org.bukkit.inventory.ItemStack
        v: 2230
        type: MAGMA_CREAM
      experience:
        ==: org.bukkit.inventory.ItemStack
        v: 2230
        type: EXPERIENCE_BOTTLE
      empty:
        ==: org.bukkit.inventory.ItemStack
        v: 2230
        type: STONE
      status:
        'false':
          ==: org.bukkit.inventory.ItemStack
          v: 2230
          type: RED_WOOL
        'true':
          ==: org.bukkit.inventory.ItemStack
          v: 2230
          type: GREEN_WOOL
     

    Overview



    FairTrade allows you to trade items between players and be sure it is fair, like in most MMO (like dofus, diablo or world of warcraft) with a customizable GUI.



    Functionalities & Qualities



    It exists lot of plugins, that will do that... But this one is in 1.15!
    • Secure trade
    • Easely customizable interface + customizable messages
    • Each transaction is registered into a SQLite database
    • Maximum distance configurable

    API

    [​IMG]

    Commands



    • /trade <player> or /req <player>
    • /accept or /acc (or left click on notification)
    • /tradelog <ID>
    • /trademax <Max Trade Distance (number)>



    GUI




    [​IMG]



    (old version, similar)
    • Left slots are what you give
    • Right slots are what you receive (unmodifiables)
    • Wool each side are for player confirm status.
    • Book is confirm / cancel button.
    • Warning : shift click, double click, or long click are unusable for security.


    Bug Report


    Please tell in comment if you discover a new bug.



    Basic Configuration


    Code (YAML):
    # max distance for trading
    max-trade-distance
    : 10.0

    # All messages are located in "lang/lang_**.yml" (ie. "lang/lang_en.yml")
    lang
    : en

    # Self trading for Testing purpose
    self
    : false
     


    All messages are modifiables (except errors).
    You can save a custom set of messages (ie. localization) into a .yml file into the lang/ folder.



    More Configuration



    To customize the interface, modify file trading.txt
    It's a representation of the ingame-GUI.
    The items itselves cannot be set for now, but you can set the layout of the menu.

    Code (Text):
    #each number is a slot
    #0=empty
    #1=local-items
    #2=remote-items
    #3=confirm
    #4=money+
    #5=money-
    #7=local-wool
    #8=remote-wool



    # only one (3)
    # nb of (1) = nb of (2)



    1,1,1,1,4,2,2,2,2,
    1,1,1,1,5,2,2,2,2,
    1,1,1,1,0,2,2,2,2,
    7,7,7,7,3,8,8,8,8
     

    Useful links

    Easy SQLite Browser

    If you have suggestions, new features, etc just ask in comments! Thanks you for downloading

    Images

    1. coollogo_com-20364268.png
    zhythero and BF3Chilled like this.

Recent Updates

  1. 3.2
  2. Stable release for 3.x
  3. 3.0 [Beta]

Recent Reviews

  1. ASKIT
    ASKIT
    5/5,
    Version: 3.2
    Accepting a deal, the player is thrown off the server because of a forbidden symbol. But there are no chat plugins on the server other than EssentialsChat
    1. Rafoudiablol
      Author's Response
      Hi, thanks for report! Can you send me the complete log message ? thanks you for reviewing & answering :)
  2. El_pika
    El_pika
    5/5,
    Version: 2.2
    Man there is an issue with the plugin ! The money feature does not work.
    It would really change my life if you could make it work !
    1. Rafoudiablol
      Author's Response
      Hey, thanks for feedback.
      I just posted an update, it should work now :)
  3. SpringBonnie
    SpringBonnie
    5/5,
    Version: 1.1b
    Very good plugin for MMORPG servers.
    Can u add support to trade with money (vault) and level (exp)?)
    1. Rafoudiablol
      Author's Response
      Money is in project, but there is a lot of different plugins, currently working about it.
      I will see for XP :)
  4. kassad
    kassad
    5/5,
    Version: 1.1b
    ==========================
    5+++++++++++++++++ Good job!
    ==========================
    1. Rafoudiablol
      Author's Response
      Thank you very much :)
  5. Benjamin83
    Benjamin83
    5/5,
    Version: 1.0b
    Amazing! Works perfectly. I didn't face any bugs yet and my players really appreciate it. Thank you, keep updating it
    1. Rafoudiablol
      Author's Response
      Thank you very much for the review, really appreciated!
  6. ItzWinterGames
    ItzWinterGames
    1/5,
    Version: 1.0
    When i do /tradelog <ID num>
    i can get the barrier item
    please fix it
    But Great plugin
    1. Rafoudiablol
      Author's Response
      Yes, i admitt that only ops would do this command.
      But it's not a big deal, I will fix it, no worries!
      However, thank you very much for the review! =)
      Why only 1 star, because of /tradelog ?