HomeJavaModsFairTrade [1.12 - 1.16.1]
FairTrade [1.12 - 1.16.1]

[​IMG]

[​IMG]

v3.1.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
 
Spoiler: 3.2
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.

Spoiler: 3.1
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.

Spoiler: 3.0
  • 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.

Spoiler: 2.4.1
  • 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.

Spoiler: 2.4
  • 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 )
Spoiler: 2.3
  • 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

Spoiler: 2.1
  • API version 1.13.1
  • Better database scheme
Spoiler: 2.0
  • 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

Spoiler: 1.1b
  • API version 1.13.1 only
  • PREFIX message editable
Spoiler: 1.1
  • API version 1.13 (1.12 still supported)
  • Self-trade disabled by default
Spoiler: 1.0b
  • 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

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


Ignore module

GUI




[​IMG]



(old version, similar)

Bug Report


Please tell in comment if you discover a new bug.


Basic Configuration


Spoiler: config.yml
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.

Spoiler: layout.yml
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
 

Spoiler: Older description (version <3.0)
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

Spoiler: Event loop
[​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


Spoiler: config.yml
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.

Spoiler: trading.txt
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
Quick facts

Install steps are the general flow for this file type — How to install Minecraft Java mods & modpacks walks through it step by step.

FairTrade [1.12 - 1.16.1] is a free Minecraft Java mod. Compatible with Minecraft 1.12, 1.13, 1.14, 1.15 and newer. Downloaded 3,924 times (via Spigot). Download it and open it directly in the game.

Explore more