Interchange - Allows for easy trading between players


#1

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.

For players

Trading commands:

  • /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.

This plugin requires Spotlin.

Planned features

  • ‘Take-it-or-leave-it’ prebuilt offers, à la Steam
  • ChatUI integration

Support

Appreciate tools like this? Wish there were more? Consider donating!


#2

A new version has been released for Interchange, it is available for download here.


Fixed a bug where cancelling a trade deleted the items in it.


#3

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.


#4

I’m sorry, I’m unable to reproduce this behavior. Are you on 0.1.1?

Video


#5

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.


#6

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 ?


#7

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.


#8

Not sure that’d be a good idea - how would it interact with the ability for trades to be interacted with while the other player is offline?


#9

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.


#10

So if a player went offline during a trade it would be simply cancelled?


#11

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 :slight_smile:
Great work btw!


#12

I can see it’s a desired feature. All right, it’ll be in the next release.


#13

Thank you so much! :smiley: Just waiting :slight_smile:


#14

Am I right that this doesn’t require a economy plugin, and that one can instead trade item-for-item?


#15

Correct.


#16

It would be nice to add Pixelmon.


#17

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.


#18

Please do.


#19

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:


After:


#20

and when you try to drop the item, it stays? It’s not a ghost item?