Fixed the references being the same, allowing for fixed repairing to fix this bug!

This commit is contained in:
Rosenthalk0 2023-04-14 16:12:31 -05:00
parent 99e893801d
commit 2ab60231b0
2 changed files with 2 additions and 2 deletions

View File

@ -36,7 +36,7 @@ public class RepairPower extends DoubleStat implements ConsumableItemInteraction
// Check repair reference
final Player player = playerData.getPlayer();
final @Nullable String repairType1 = target.getString(REPAIR_TYPE_TAG);
final @Nullable String repairType1 = consumable.getNBTItem().getString(REPAIR_TYPE_TAG);
final @Nullable String repairType2 = target.getString(REPAIR_TYPE_TAG);
if (!MMOUtils.checkReference(repairType1, repairType2)) {
Message.UNABLE_TO_REPAIR.format(ChatColor.RED, "#item#", MMOUtils.getDisplayName(target.getItem())).send(player);

View File

@ -37,7 +37,7 @@ public class RepairPowerPercent extends DoubleStat implements ConsumableItemInte
// Check repair reference
final Player player = playerData.getPlayer();
final @Nullable String repairType1 = target.getString(REPAIR_TYPE_TAG);
final @Nullable String repairType1 = consumable.getNBTItem().getString(REPAIR_TYPE_TAG);
final @Nullable String repairType2 = target.getString(REPAIR_TYPE_TAG);
if (!MMOUtils.checkReference(repairType1, repairType2)) {
Message.UNABLE_TO_REPAIR.format(ChatColor.RED, "#item#", MMOUtils.getDisplayName(target.getItem())).send(player);