TradeMod
Update: 4/12/2016
Taking a quick break from active development. Currently, plans for next update include: currency/economy support, revised help information, command-less accepting/requesting, across game-mode trading configuration, and toggle for max-distance config. Obviously, this may take me a while to implement properly, so give me some time.
What is TradeMod?
TradeMod is a plugin that allows players to trade with one another in a similar vein to games like RuneScape or services such as Steam.
Features
- Safe trading using an inventory window to represent a trading screen.
- Configuration of values and messages.
How do I use it?
Take a look at the HELP page by clicking here OR:
Server Owners
Server owners, please carefully read the config.yml generated upon running the plugin. It should give you all the information you need to start configuring the plugin.
Permissions
trademod.commands.help: If given permission, allows the player to use the /tm help command. Default: true
trademod.commands.reload: If given permission, allows the player to use the /tm reload command. Default: op
trademod.commands.open: If given permission, allows the player to use the /tm open command. Default: true
trademod.commands.cancel: If given permission, allows the player to use the /tm cancel command. Default: true
trademod.commands.request: If given permission, allows the player to use the /tm request command. Default: true
trademod.commands.accept: If given permission, allows the player to use the /tm accept command. Default: true
trademod.commands.confirm: If given permission, allows the player to use the /tm confirm command. Default: true
Source Code
You can find the source here
Questions? Need Support?
You can click here to enter TradeMod's Discord server.
TODO (in no particular order):
1. Economy support using Vault.
2. Administrative commands and features.
3. Logging of trades.
@CommodoreAlpha
There's a legitimate problem with that that really turned me off; the player would have to previously own the item for it to work. I'm really leaning towards making it configurable on the server-side, and letting the server admins consider whether or not to enable it or disable it.
What about right clicking with a certain item in hand? Seems fair enough (for everyone). I originally didn't want the right-click feature at all, due to incompatibility, but requiring a certain item (or items) in hand could eliminate any incompatibility issue while keeping the convenience, and thus a lot of people happy. Oh, and, crouching and right clicking seems a bit awkward for me.
And of course, the item in hand would be configurable. Make it by default a gold nugget.
@Snowybearr
Sorry for a late reply.
It's awesome that you support the plugin enough to consider developing an addon like this, and I certainly appreciate it. However, before I implemented a feature like that (that could potentially lower compatibility with other plugins) I would need to run a poll. Also, it'd probably be a setting, along with having permissions, so that even with its implementation I could minimize any compatibility issues.
Here's what I'm planning for the next update: - Hopefully fixes for the visual glitches (HIGH priority) - Implementation of right clicking on the other player to "resume" (re-open trade window) a trade. I may make it modifiable by the player so they could turn it off at their will.
I also acknowledge the request for modifiable messages (to account for different languages and such). I've come up with a way to solve this, and it will come after I complete the newest update.
@Sonorpearl
This feature is already existent in the mod, they're present in the tradelogs.txt file in the TradeMod folder.
Can you add a option for custom messages?
Is there a way to create a Trade-Log with Money and Things that were traded?
@KevinEssence
Thanks. So here it is for anyone wanting it, if you hold shift and right click a player, it will send a trade request and accept it. - https://dl.dropbox.com/u/29757273/RightClickCommand.zip
It's a bit spammy because of default messages, maybe TheRealKoanga will give us an option to disable/edit the messages, so that it won't be an issue. Other then that, it works. All though I did notice you can trade citizens if you use that plugin, which is interesting, but can't do anything about that.
I also included the source for anyone who wants it, feel free to do whatever you want with it, like change the messages or anything, I dunno, whatever floats your boat. Or maybe TheRealKoanga you want to add it to your actual plugin? Anyway, have fun. :)
@Snowybearr
That'd be amazing, keep up the good work.
@KevinEssence
I'm actually just making a quick plugin to extend this, going to make it when you right click a player it issues command /tm req and /tm acc. It's less then 10 lines of code, and basically working, I just want to make it double click instead, I'm playing with it to try and get it to work.
@Snowybearr
I feel you :_X
@KevinEssence
That is what I requested, and he replied saying it wouldn't be a good idea sadly. Love this plugin, but man I am so tired of everything being command based. :/
When are the planned right clicking trade options going to be added?
@TheRealKoanga
Please ADD LANGUAGE CONFIG! Thanks !
@Superboop
That's quite a good idea, and as I've said to Commodore, I may make it configurable as to which configuration you wish to use (and this would be an individual choice, not server-wide). I'll have to figure out which size inventory will give the exact same inventory space for trading, as well as the best way to visually separate each window portion.
This will all come with time, definitely after I fix the visual glitches that plague the newest versions.
@CommodoreAlpha
Thank you, and I may consider making it configurable as to which design you want (vertical or horizontal window), however I'll have to look into which configuration will give the same inventory space for both players.
Two vertical portions, side-by-side in a single "trade screen" is also far more intuitive than comparing two horizontal portions that are stacked on top of each other. This is because when items are displayed in two side-by-side portions, it is easy to look left and right to make comparisons. (Most people are more used to going from left to right/right to left because that's how we naturally read.)
And again, one of the best trading plugins ever. I actually enjoy the fact that it uses commands over no commands. I find that "a lack of commands" claim to be highly overrated as many plugins boast about. The problem should be difficult-to-remember/lengthy commands, not concise/simple/intuitive ones like the ones you have here. (Plus, these issues can usually be resolved with an Alias plugin.)
I was thinking, why not make each section of the trade screen as vertical (left 4 and right 4) instead of horizontal (top 3 and bottom 3)? This way you can create a boundary on the middle and let newer players understand better.
@Snowybearr
It's a great idea, the only problem being is that I want this plugin to compatible with every plugin possible, and making it a general right-click wouldn't contribute to this.
Would it be possible to make it send a request to a player when they right click on the player? I know there is onActivate, but I'm not sure if that only applies to items and objects. Either way that would be super awesome, remove the need of the command. So I could right click you, it would say in your chat "PlayerName would like to trade with you" then you can right click me, and boom we are trading. How awesome would that be!?
Edit: You could even take it a step further and remove the use of /tm open, if you right click on them, it could check if they have an existing trade going, and just open that one back up.
Edit2: Found it, this is the event you would need to make it work, if you want to implement this idea - onPlayerInteractEntityEvent