erikzimmermann / TradeSystem

A highly customizable, free and open-source Minecraft plugin for trading between players.
https://www.spigotmc.org/resources/trade-system-custom-layouts.58434/
MIT License
77 stars 47 forks source link

Permissions for add money and items #533

Closed Regomy closed 4 months ago

Regomy commented 5 months ago

Added permissions for trades with currency and items.

Where can it be useful? For example, if someone needs to buy the rights to be able to transfer money through trades, this could be bypassed.

If someone doesn't want to allow transferring items, I honestly can't think of why, but why not?

Regomy commented 5 months ago

521

Regomy commented 4 months ago

Hi, thanks for your contributions! Really appreciate them :)

As a small remark, please stick to the available Permissions class (at de.codingair.tradesystem.spigot.utils.Permissions) to register permissions. Please also make sure to add them in the plugin.yml.

Thanks, i do it :)

erikzimmermann commented 4 months ago

Hi, I thought a bit about the changes you're suggesting here and I'm a bit uncomfortable with merging it. I've got 2 big reasons:

  1. The setup of the plugin gets more complex which should not be the case. Also upgrading would introduce issues for all current users of the plugin because most people just don't read the update logs.
  2. In case, the permissions for items and money are not set, the player will not understand why they cannot do anything. If the player doesn't have any of those two permissions, they cannot even trade anything so the trade request should not be able to be sent or accepted in the first place. Also, when the player is only missing the money-permission, then there should be some visual change to the money icon so that it can be seen before one has to click on the item to read the message in the chat about missing permissions. EDIT: And when a player only has the money permission, all other actions are just cancelled with "you don't have permissions" which is not transparent enough.

I don't say the original idea is bad, but for a good implementation there are just a few things missing here. When considering all the changes that must be made to include said features, I think it is just too much for a single person requesting this feature. However, it is still open source so you can easily use your implementation for your server.