This is a discussion topic for the Ore project, Interchange. View the full project on Ore for downloads and more information.
Interchange
Interchange is a plugin to bring simple and easy trading to Sponge. With an easy inventory menu, players can trade items and money in a Steam-style two-stage trading system.
/trade request <player>: Request that <player> trade with you.
/trade accept <player>: Accept a trade request from <player>.
/trade cancel <player>: Cancel a trade to <player>.
/trade decline <player>: Decline a trade request from <player>.
Once a trade has been accepted, players can now add items to the trade through the inventory via /trade open <player>, or through /trade add hand <player>. If you have an economy plugin installed, you can also add money to the trade, via /trade add money <player> <amount> [<currency>]. If you’re offline when important things happen, you can see what happened while you were gone with /trade notifications.
Through the GUI you can set yourself to ‘ready’, and once you’re both ready you can each confirm the trade. If one player is offline when this happens, or if their inventory / economy account is too full to accept the trade, then they’ll be held for a few minutes while you run /trade claim money or /trade claim item drop|give.
For admins
The configuration is very simple. default-claim-timeout-minutes is the default number of minutes before unclaimed trade items/money disappear, and default-drop-item-claims-on-timeout is whether items drop (as opposed to being voided) when this happens. Both of these can be overridden per user or group by setting interchange:claim-timeout-minutes or interchange:drop-item-claims respectively through your permission management plugin.
Tried out your plugin today! Looks good so far. We had one issue. Whoever initiates the trade keeps whatever item then put in the trade (the other person gets them as well). We tested with across 2 different users.
Yes. I am on 0.1.1. I can try to get a gif or a video of it later. We tried trading dark gem essence. I only had 1 stack on me. COmpleted trade. Other person had a stack and I still had mine.
Hey ! Your plugin looks really cool !
Would it be possible to add a proximity feature that could be turned ON or OFF that would require players to be close to eachother to be able to trade items ?
Waiting on that video. Meanwhile, a good idea is to repro it on a test world, then remove mods one by one until it disappears. Then we can pinpoint where the interaction is.
Well, players who are offline simply wouldn’t be able to receive trades from online players, but as I said earlier it should be an option, not how the plugin should actually work by default.
Hey. I think the same as @Grid - there should be an exclusive option for trading only with nearby players. I really need that for my server. I’d really appreciate if you develop that option
Great work btw!
I gave this a try with some friends last night and there appears to be an issue where items sometimes don’t get removed from the offerer’s inventory, causing a dupe. I’ll try to get you some relevant logs(if there are any) and/or screenshots showing this.
I was unable to find any relevant info in the logs, aside from the order I actually used the commands in. I shift clicked the items in on both sides, I believe that may be part of the problem as I was unable to reproduce it without shift clicking the items in.
Interchange 0.1.1
spotlin-7.0.0-1.3.0-0.2.0
spongeforge-1.12.2-2825-7.1.7-RC3770
I’m not sure if this part matters, but this is the order the commands were run in.
[14:12:46] [Server thread/INFO] [nucleus]: ClansCraft ran the command: /trade request the_fireplace
[14:12:49] [Server thread/INFO] [nucleus]: The_Fireplace ran the command: /trade accept clanscraft
[14:12:51] [Server thread/INFO] [nucleus]: The_Fireplace ran the command: /trade open clanscraft
[14:12:55] [Server thread/INFO] [nucleus]: ClansCraft ran the command: /trade open the_fireplace
Before: