mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2025-08-03 04:55:28 +02:00
Yikes that was a lot of merge conflicts.
This commit is contained in:
@@ -114,9 +114,8 @@ public class RepairManager extends SkillManager {
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
//byte repairMaterialMetadata = repairable.getRepairMaterialMetadata();
|
||||
ItemStack toRemove = new ItemStack(repairMaterial);
|
||||
toRemove.setAmount(1);
|
||||
|
||||
short startDurability = item.getDurability();
|
||||
|
||||
@@ -126,26 +125,6 @@ public class RepairManager extends SkillManager {
|
||||
return;
|
||||
}
|
||||
|
||||
// Check if they have the proper material to repair with
|
||||
/*if (!inventory.contains(repairMaterial)) {
|
||||
String prettyName = repairable.getRepairMaterialPrettyName() == null ? StringUtils.getPrettyItemString(repairMaterial) : repairable.getRepairMaterialPrettyName();
|
||||
|
||||
String materialsNeeded = "";
|
||||
|
||||
if (repairMaterialMetadata != (byte) -1 && !inventory.containsAtLeast(toRemove, 1)) {
|
||||
materialsNeeded += ":" + repairMaterialMetadata;
|
||||
}
|
||||
|
||||
NotificationManager.sendPlayerInformation(player, NotificationType.SUBSKILL_MESSAGE_FAILED, "Skills.NeedMore.Extra", prettyName, materialsNeeded);
|
||||
return;
|
||||
}*/
|
||||
|
||||
// Do not repair stacked items
|
||||
if (item.getAmount() != 1) {
|
||||
NotificationManager.sendPlayerInformation(player, NotificationType.SUBSKILL_MESSAGE_FAILED, "Repair.Skills.StackedItems");
|
||||
return;
|
||||
}
|
||||
|
||||
// Clear ability buffs before trying to repair.
|
||||
SkillUtils.removeAbilityBuff(item);
|
||||
|
||||
@@ -165,11 +144,6 @@ public class RepairManager extends SkillManager {
|
||||
}
|
||||
|
||||
// Remove the item
|
||||
/*if (repairMaterialMetadata == -1) {
|
||||
toRemove = inventory.getItem(inventory.first(repairMaterial)).clone();
|
||||
toRemove.setAmount(1);
|
||||
}*/
|
||||
|
||||
inventory.removeItem(toRemove);
|
||||
|
||||
// Give out XP like candy
|
||||
|
@@ -8,7 +8,6 @@ import org.bukkit.Material;
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
|
||||
|
||||
public class Repairable {
|
||||
private final Material itemMaterial;
|
||||
private final List<Material> repairMaterials;
|
||||
|
Reference in New Issue
Block a user