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

Handle GriefDefender claim block categories individually #527

Open TheosisOfficial opened 5 months ago

TheosisOfficial commented 5 months ago

When trading GriefDefender claim blocks, it uses "bonus" claim blocks, but when checking how many claim blocks a player has (to make sure they have enough to trade), it checks the player's total claim blocks, instead of just their "bonus" claim blocks.

GriefDefender categorises its claim blocks into 3 categories:

  1. Initial claim blocks - The amount of claim blocks new players start with
  2. Accrued claim blocks - The amount of claim blocks players have accrued over time
  3. Bonus claim blocks - The amount of claim blocks players have gained through other means (in-game shops, commands, etc.)

A player's total claim blocks is these 3 values added together. My proposal is that TradeSystem has the option to handle these 3 values individually.

My reason for wanting this is because I want players to be able to trade their "bonus" claim blocks with each other, but I don't want them to be able to trade their "initial" claim blocks. Here is an example of why this is a problem for me:

  1. A player wants more claim blocks, but doesn't want to buy them from the in-game shop.
  2. He logs in with a bunch of alternate accounts, all of which have an "initial" claim blocks value of 200.
  3. He uses them to trade their "initial" claim blocks to him.
  4. He just got a lot of free claim blocks.

If TradeSystem checked the "bonus" blocks of the alternate accounts instead of the total, they would not have been able to trade the player.