mirror of
https://github.com/PretzelJohn/VillagerTradeLimiter.git
synced 2024-11-10 12:39:51 +01:00
5110befd30
* Added /vtl see <player> command to see the trade prices of another player * Added /vtl invsee command to see the inventory of a villager * Added customizable help, success, error messages * Added result slot options, so people can change the currency and amount of the resulting item from a trade * Massive code rewrite for better sustainability and reliability * Fixed villager inventory dupe bug: food in a villager's inventory would multiply 16+ times each time a player traded with the villager * Smoothed out hero of the village, so the player never loses their original potion effect when trading with villagers TO-DO: * Add long-term restock cooldown * Add enchantment, custom model data, names, and lores to ingredient & result settings? * GUI Editor |
||
---|---|---|
src | ||
.gitignore | ||
pom.xml | ||
README.md |
VillagerTradeLimiter (VTL)
by PretzelJohn
Description:
This Minecraft plugin limits the villager trade deals that players can get when they cure a zombie villager.
Commands:
Command | Alias | Description |
---|---|---|
/villagertradelimiter |
/vtl |
shows a help message |
/villagertradelimiter reload |
/vtl reload |
reloads config.yml |
Permissions:
Permission | Description | Default User(s) |
---|---|---|
villagertradelimiter.* | Allows players to use /vtl and /vtl reload |
OP |
villagertradelimiter.use | Allows players to use /vtl |
OP |
villagertradelimiter.reload | Allows players to reload config.yml and messages.yml | OP |
Config:
-
Global settings: These settings apply to all villagers and villager trades.
Setting Description bStats:
This helps me keep track of what server versions are being used. Please leave this set to true. DisableTrading:
Whether to disable all villager trading for all worlds, some worlds, or no worlds.
Options:- Add world names for worlds that you want to completely disable ALL villager trading.
- Set to true to disable trading in all worlds.
- Set to false or [] to disable this feature.
MaxHeroLevel:
The maximum level of the "Hero of the Village" (HotV) effect that a player can have. This limits HotV price decreases.
Options:- Set to -1 to disable this feature and keep vanilla behavior
- Set to a number between 0 and 5 to set the maximum HotV effect level players can have
MaxDiscount:
The maximum discount (%) you can get from trading/healing zombie villagers. This limits reputation-based price decreases.
Options:- Set to -1.0 to disable this feature and keep vanilla behavior
- Set to a number between 0.0 and 1.0 to limit the maximum discount a player can get. (NOTE: 30% = 0.3)
- Set to a number above 1.0 to increase the maximum discount a player can get. (NOTE: 250% = 2.5)
MaxDemand:
The maximum demand for all items. This limits demand-based price increases.
Options:- Set to -1 to disable this feature and keep vanilla behavior
- Set to 0 or higher to set the maximum demand for all items
WARNING: The previous demand information cannot be recovered if it was higher than the MaxDemand.MaxUses:
The maximum number of times a player can make any trade before a villager is out of stock.
Options:- Set to -1 to disable this feature and keep vanilla behavior
- Set to 0 or higher to change the maximum number of uses for all items
-
Per-item settings: (
Overrides:
)Setting Description <item_name>:
Override the global settings by adding as many of these as you need. Enchanted books must follow the format of name_level
(mending_1). All other items must follow the format ofitem_name
(stone_bricks)..Disabled:
Disables any trade that contains the item (true/false) .MaxDiscount:
Sets the maximum discount for this item (-1.0, or between 0.0 to 1.0) .MaxDemand:
Sets the maximum demand for this item (-1, or 0+) .MaxUses:
Sets the maximum number of times a player can make the trade before the villager is out of stock .Item1.Material:
.Item2.Material:
Sets the material of the 1st or 2nd item in the trade
WARNING: This cannot be undone!.Item1.Amount:
.Item2.Amount:
Sets the amount of the 1st or 2nd item in the trade
WARNING: This cannot be undone! -
For the default config.yml, see:
src/main/resources/config.yml