Better MendingСкачатьСкачатьСкачатьСкачатьСкачатьСкачатьСкачатьСкачать
ВЕРСИИ (8)
alpha
Better Mending 1.0.7-1.19.3-paper dont use
1.0.7-1.19.3-paper9 янв. 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-paper8 янв. 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-paper8 янв. 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-paper7 янв. 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-paper7 янв. 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-paper7 янв. 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-paper7 янв. 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-paper7 янв. 2023 г.119Minecraft: 1.19.3paper, purpur
Что нового
Initial release of BetterMending
Repair amounts and costs are configurable