mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2025-04-11 06:06:24 +02:00
31 lines
898 B
Java
31 lines
898 B
Java
package com.gmail.nossr50.skills.repair;
|
|
|
|
|
|
import java.util.HashSet;
|
|
|
|
/**
|
|
* Represents a complete repair transaction
|
|
* A repair transaction is made up of a multiple RepairCost objects
|
|
* A RepairCost object is used to find a matching ItemStack in a players inventory if one exists
|
|
* A RepairCost object can be a single item or it can be multiple items representing a range of compatible items to pay that part of the RepairTransaction
|
|
*/
|
|
public class RepairTransaction {
|
|
private HashSet<RepairCost> repairItems;
|
|
|
|
public RepairTransaction() {
|
|
repairItems = new HashSet<>();
|
|
}
|
|
|
|
public void addRepairCost(RepairCost repairCost) {
|
|
repairItems.add(repairCost);
|
|
}
|
|
|
|
public HashSet<RepairCost> getRepairItems() {
|
|
return repairItems;
|
|
}
|
|
|
|
public void setRepairItems(HashSet<RepairCost> repairItems) {
|
|
this.repairItems = repairItems;
|
|
}
|
|
}
|