COWMODSКаталог модов

Better Mending

A plugin that allows players to repair their items with experience points, with customizable repair amounts and costs.

Автор: laika1,1 тыс.12обновлён 9 янв. 2023 г.
СнаряжениеМеханики игрыУтилиты

Описание

This project has been replace by ForgeMend

. .

BetterMending

A plugin that allows players to repair their items with experience points, with customizable repair amounts and costs.

Features

  • Repair items using experience points on a specific enchantments
  • Permission is required to use the repair feature (Default: true)
  • Repair items with the right click mouse button while holding shift
  • Allow only certain enchantments to be repaired with the plugin

BetterMending gif

Configuration

The plugin's configuration can be found in the plugins/BetterMending/config.yml file.

# The amount of experience points required to repair 1 durability point
xpCost: 1

# The amount of durability points repaired per use
repairAmount: 2

# List of enchantments that are allowed to be used with the repair feature.
# The plugin will only use enchantments from this list for repair.
# Enchantments should be specified using their Minecraft ID (e.g. MENDING, PROTECTION).
# To allow all enchantments, specify "any" (without quotes).
allowedEnchantments:
 - MENDING

# Message displayed when the player does not have permission to use the repair feature
noPermissionMessage: "You do not have permission to use the repair feature!"

# Message displayed when the player's item is already fully repaired
itemAlreadyRepaired: "Your item is already fully repaired."

# Message displayed when the player's item does not have the MENDING enchantment
itemDoesNotHaveMending: "Your item does not have the MENDING enchantment."

# Message displayed when the MENDING enchantment is not allowed on the server
mendingNotAllowed: "The MENDING enchantment is not allowed on this server."

# Message displayed when the player does not have enough XP to repair their item
insufficientXP: "You do not have enough XP to repair your item."

# Message displayed when showing the player how much durability is left until their item is fully repaired
durabilityLeftMessage: "Your item has %d durability left until it is fully repaired."

# Message displayed when showing the player how many repairs are needed and how much XP it will cost to fully repair their item
repairsNeededMessage: "It will take %d repair(s) to fully repair your item, costing a total of %d exp points."

Permissions

bettermending.use: Allow a player to use the repair feature

Statistics

bstats

Галерея

Последние версии

Все версии →
alpha

Better Mending 1.0.7-1.19.3-paper dont use

1.0.7-1.19.3-paper
9 янв. 2023 г.333Minecraft: 1.16, 1.16.1, 1.16.2, 1.16.3, 1.16.4, 1.16.5, 1.17, 1.17.1, 1.18, 1.18.1, 1.18.2, 1.19, 1.19.1, 1.19.2, 1.19.3bukkit, paper, purpur, spigot
Скачать
Что нового
- Fixed a syntax error in the code - Problem: There was no opening parenthesis after `else if` and the semicolon at the end of the line was terminating the `if` statement prematurely. - Solution: Added the missing parenthesis and removed the semicolon at the end of the line.
alpha

Better Mending 1.0.6-1.19.3-paper

1.0.6-1.19.3-paper
8 янв. 2023 г.110Minecraft: 1.19, 1.19.1, 1.19.2, 1.19.3paper, purpur
Скачать
Что нового
## Changes - Replace the following block of code: ```java List<String> allowedEnchantments = getConfig().getStringList("allowedEnchantments"); for (Enchantment enchant : enchantments.keySet()) { if (!allowedEnchantments.contains(enchant.getName())) { // Enchantment is not allowed, cancel the event interactEvent.setCancelled(true); return; } } ``` with the following code: ```java if (enchantments.isEmpty()) { // Item has no enchantments, cancel the event interactEvent.setCancelled(true); return; } List<String> allowedEnchantments = getConfig().getStringList("allowedEnchantments"); boolean hasAllowedEnchantment = false; for (Enchantment enchant : enchantments.keySet()) { if (allowedEnchantments.contains(enchant.getName())) { hasAllowedEnchantment = true; break; } } if (!hasAllowedEnchantment) { // Item does not have any allowed enchantments, cancel the event interactEvent.setCancelled(true); return; } ``` This change modifies the `onPlayerInteract` method to check if the item being repaired has at least one allowed enchantment, rather than checking if all of its enchantments are allowed. If the item has at least one allowed enchantment, the player is allowed to use experience points to repair the item. If the item does not have any allowed enchantments, the event is cancelled and the player is not allowed to use experience points to repair the item.
alpha

Better Mending 1.0.5-1.19.3-paper

1.0.5-1.19.3-paper
8 янв. 2023 г.91Minecraft: 1.19.3paper, purpur
Скачать
Что нового
- Fix issue with enchantment in config not working
release

1.0.4-1.19.3-paper

1.0.4-1.19.3-paper
7 янв. 2023 г.194Minecraft: 1.19.3paper, purpur
Скачать
Что нового
### Changed - Forgot to include permission in plugin.yml - Optimize code
alpha

1.0.3-1.19.3-paper

1.0.3-1.19.3-paper
7 янв. 2023 г.95Minecraft: 1.19.3paper, purpur
Скачать
Что нового
# Added - Config options for messages: `noPermissionMessage, itemAlreadyRepaired, itemDoesNotHaveMending, mendingNotAllowed, insufficientXP, durabilityLeftMessage, repairsNeededMessage`. - `/bm reload` command to allow users with the `bettermending.reload` permission to reload the plugin's config. - `/bm status` command to allow users to check how many xp cost and durability repair.
beta

1.0.2-1.19.3-paper

1.0.2-1.19.3-paper
7 янв. 2023 г.94Minecraft: 1.19.3paper, purpur
Скачать
Что нового
### Added - Configuration option `allowedEnchantments` to allow players to choose which enchantments they want to use with the repair feature. The plugin will only use enchantments from this list for repair. ### Changed - Event handler to use the `containsKey` method of the `Map` class to check if an `ItemStack` has the MENDING enchantment, and the `contains` method of the `List` class to check if the MENDING enchantment is in the list of allowed enchantments. - Dependency on bStats library to the latest version to fix a compilation error. - Configuration option `xpCost` to 1. The amount of experience points required to repair 1 durability point is now 1. - Configuration option `repairAmount` to 2. The amount of durability points repaired per use is now 2. ### Removed - Unused `metrics` variable from the `onEnable` method.
alpha

1.0.1-1.19.3-paper

1.0.1-1.19.3-paper
7 янв. 2023 г.109Minecraft: 1.19.3paper, purpur
Скачать
Что нового
Added bstats to project for plugin analytics
alpha

1.0.0-1.19.3-paper

1.0.0-1.19.3-paper
7 янв. 2023 г.119Minecraft: 1.19.3paper, purpur
Скачать
Что нового
Initial release of BetterMending Repair amounts and costs are configurable