mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2024-11-22 05:06:45 +01:00
You can no longer repair/salvage item stacks with more than one item
This commit is contained in:
parent
549ef5734e
commit
a132172507
@ -1,6 +1,10 @@
|
||||
Version 2.1.71
|
||||
Salvage will now always ask for confirmation before breaking your items (instead of only asking for enchanted items)
|
||||
Repair will now always ask for confirmation before repairing items (instead of only asking for enchanted items)
|
||||
Gold & Iron Blocks will no longer trigger tool ready messages
|
||||
Salvage & Repair anvils will no longer work on multi-item stacks
|
||||
|
||||
NOTES: You can still turn the confirmation off in config.yml
|
||||
|
||||
Version 2.1.70
|
||||
Added new DatabaseAPI to the API package, has features relating to database operations
|
||||
|
@ -603,7 +603,10 @@ public class PlayerListener implements Listener {
|
||||
|
||||
if (!Config.getInstance().getAbilitiesOnlyActivateWhenSneaking() || player.isSneaking()) {
|
||||
/* REPAIR CHECKS */
|
||||
if (type == Repair.anvilMaterial && PrimarySkillType.REPAIR.getPermissions(player) && mcMMO.getRepairableManager().isRepairable(heldItem)) {
|
||||
if (type == Repair.anvilMaterial
|
||||
&& PrimarySkillType.REPAIR.getPermissions(player)
|
||||
&& mcMMO.getRepairableManager().isRepairable(heldItem)
|
||||
&& heldItem.getAmount() <= 1) {
|
||||
RepairManager repairManager = mcMMOPlayer.getRepairManager();
|
||||
event.setCancelled(true);
|
||||
|
||||
@ -614,7 +617,10 @@ public class PlayerListener implements Listener {
|
||||
}
|
||||
}
|
||||
/* SALVAGE CHECKS */
|
||||
else if (type == Salvage.anvilMaterial && PrimarySkillType.SALVAGE.getPermissions(player) && mcMMO.getSalvageableManager().isSalvageable(heldItem)) {
|
||||
else if (type == Salvage.anvilMaterial
|
||||
&& PrimarySkillType.SALVAGE.getPermissions(player)
|
||||
&& mcMMO.getSalvageableManager().isSalvageable(heldItem)
|
||||
&& heldItem.getAmount() <= 1) {
|
||||
SalvageManager salvageManager = UserManager.getPlayer(player).getSalvageManager();
|
||||
event.setCancelled(true);
|
||||
|
||||
|
@ -410,6 +410,8 @@ public class MaterialMapStore {
|
||||
toolBlackList.add("oak_wood");
|
||||
toolBlackList.add("spruce_log");
|
||||
toolBlackList.add("spruce_wood");
|
||||
toolBlackList.add("iron_block");
|
||||
toolBlackList.add("gold_block");
|
||||
}
|
||||
|
||||
private void addToHashSet(String string, HashSet<String> stringHashSet)
|
||||
|
@ -54,6 +54,7 @@ JSON.Notification.SuperAbility={0}
|
||||
#These are the JSON Strings used for SubSkills
|
||||
JSON.Acrobatics.Roll.Interaction.Activated=Test [[RED]]Rolled Test
|
||||
JSON.Acrobatics.SubSkill.Roll.Details.Tips=If you hold sneak while falling you can prevent up to twice the damage that you would normally take!
|
||||
Anvil.SingleItemStack=[[RED]]You cannot salvage or repair item stacks that have more than one item, split the stack first.
|
||||
|
||||
#DO NOT USE COLOR CODES IN THE JSON KEYS
|
||||
#COLORS ARE DEFINED IN advanced.yml IF YOU WISH TO CHANGE THEM
|
||||
|
Loading…
Reference in New Issue
Block a user