Sueta

TradeUI

1.1.8b

[1.14.x-1.16.x] A simple and easy to use trading plugin

·Plugin

Preface
If you wish to run the plugin on 1.14/1.15, make sure to change the version option in the config. This plugin is written by a human, and I cannot guarantee that it does not contain bugs, use it at your own risk, ( or use core protect.) Please report any bugs to https://github.com/RyanA3/TradeUI/issues, or to the plugin's discussion section.

What it does

TradeUI is a compact plugin that lets players trade with each other through an inventory menu. Players can either send and accept trade requests by shift-right-clicking each other, or using the trade commands listed below.

How to use it
Everything begins with a trade request. You can't start trading with another player unless you have sent them a trade request. You can send trade requests by using the /trade command, or by shift-right-clicking the player you wish to trade with. You can only have one active trade request. Players must accept a request to begin trading. If the request is not accepted in time, or either of the players walk away from each other, the request will be cancelled.
When a trade is accepted, players will be able to place items they wish to trade on the left side of the menu, and they will be able to see what items they will receive on the right side of the menu. Each player has an accept button at the bottom of the menu. If both of these buttons are clicked to green, then the trade will be accepted and the items placed into the menu will be exchanged. If a player exits out of the menu during a trade, the trade will be cancelled and players will be refunded their items.

Logistics

Commands and Permissions

Commands;
- /trade <player> --> Sends or accepts a trade request from the designated player.
- /trade accept <player> --> Accepts a trade request from the designated player
- /trade deny <player> --> Denies a trade request from the designated player
- /trade cancel --> Cancels a trade request that you have sent
- /trade reload --> Reloads the entire plugin, including configs

Permissions;
- trade_ui.trade --> Players must have this permission to send and accept trade requests
- trade_ui.reload --> Grants permission to the /trade reload command

Note: Config files must be updated by YOU when new options are added to the configs, unless you do not wish to use them.

English
config.yml
#HHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHH
#         TRADE UI GENERAL CONFIG         H
#          Plugin by Felnstaren           H
#HHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHH


# What messages do you want to see from this plugin?
# DEBUG -> INFO -> WARN -> SEVERE
# You will see all messages above the priority you select
logger-priority: INFO


#Set to false to disable trading by using commands
allow-commands: true

#Set to false to disable trading by shift-right-clicking
allow-shifting: true

#Set to false to allow all players to trade
require-trade-permission: true

#Set to -1 to remove the distance requirement
max-trade-distance: 15

#How long until trades automatically time-out
trade-request-timeout: 20

#Set this to false to not automatically cancel requests if players walk away
cancel-request-on-walk-away: true

#Set this to true to allow players to trade with themselves, Warning: THIS IS A FEATURE PURELY FOR TESTING, the plugin WILL malfunction if you set this to true
allow-self-trading: false

#Set this to the main version your server is running on
#Supported versions
# (1.16.x)   --->   116
# (1.15.x)   --->   115
# (1.14.x)   --->   114
version: 116
lang.yml
#HHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHH
#         TRADE UI LANGUAGE CONFIG         H
#           Plugin by Felnstaren           H
#HHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHH

#===============================================
# > INFO                                       >
#   Use this config to customize plugin messages
# to your liking, or to change the language used
# to something your server prefers.
#
#===============================================
# > FORMATTING                                 >
#   Use the '&' symbol for color coding,
# &0 -> Black; &1 -> Dark Blue; &2 -> Dark Green
# &3 -> Dark Aqua; &4 -> Dark Red; &5 -> Purple
# &6 -> Gold; &7 -> Light Gray; &8 -> Gray;
# &9 -> Blue; &a -> Light Green; &b -> Aqua;
# &c -> Red; &d -> Pink; &e -> Yellow;
# &f -> White;
#
#   The following are "message variables" and
# will be replaced with the appropriate value
# when they are sent.
# [Player]
# [Timeout]
# [Permission]
#
#   Use '\n' to add a line break, making the
# message continue on the next line
#
#===============================================


err:
 commands-disabled: "&cCommands have been disabled by an administrator, maybe you should try shift-right-clicking someone."
 impossible-action: "&cThis action is not allowed by TradeUI."
 invalid-command: "&cIncorrect command usage."
 no-permission: "&cYou do not have permission to &7[Permission]&c!"
 no-request: "&cYou do not have an active trade request."
 only-one-request: "&cYou can only have one active trade request."
 player-not-found: "&7[Player] &cis not online at the moment."
 player-is-trading: "&7[Player] &cis already trading."
 player-hasnt-request: "&7[Player] &chas not requested to trade with you."
 player-too-far-away: "&cYou are too far away from &7[Player] &cto trade with them!"
 player-hasnt-permission: "&7[Player] &cdoes not have permission to &7[Permission]&c!"
 cant-trade-self: "&cYou cannot trade with yourself!"

ifo:
 sent-request: "&aYou have sent a trade request to &7[Player]"
 accept-request: "&aYou have accepted &7[Player]&a's trade request"
 cancel-request: "&aYou have cancelled your request to &7[Player]"
 deny-request: "&aYou have denied &7[Player]&a's trade request"
 time-out-request: "&eYou didn't accept &7[Player]&e's trade request in time"
 walk-away-request: "&eYou walked away from &7[Player]"

 request-received: "&7[Player] &ahas requested to trade with you"
 request-accepted: "&7[Player] &ahas accepted your trade request"
 request-denied: "&7[Player] &ahas denied your trade request"
 request-cancelled: "&7[Player] &ahas cancelled their request to trade with you"
 request-timed-out: "&7[Player] &edidn't accept your request in time"
 request-walked-away: "&7[Player] &ewalked away"

 session-cancelled: "&eThe trade was cancelled!"
 session-succeeded: "&aThe trade was successful!"

 will-reload: "&7Reloading the config and lang files..."


cmd:
 accept-button: "&7[&aAccept&7]"
 cancel-button: "&7[&cCancel&7]"
 deny-button: "&7[&cDeny&7]"
 accept-usage: "&7Use /trade accept <Player>"
 deny-usage: "&7Use /trade deny <Player>"
 trade-master-usage: "&7 --- &8[&9TradeUI&8]&7 ---    \n&a/trade <Player>    \n&a/trade cancel    \n&a/trade accept <Player>    \n&a/trade deny <Player>"

menu:
 header: "&0YOU   >>>   [Player]"

What it Looks Like (Images)

What the Menu Looks Like

Capture.PNG

What a Trade Request Looks Like

Request.PNG

What you should NOT expect this plugin to do
In order to remain as simple and easy to use as possible, TradeUI does not and never will support the trading of player exp or money from economy plugins. However, if trading money and exp is a necessity for you, I suggest you use an exp bottling plugin or a bank notes plugin which will allow players to trade exp bottles and bank notes as items, which tends to be a much more intuitive method.

Bstats;
https://bstats.org/plugin/bukkit/TradeUI/7321

Similar projects

Plugin →