mirror of
https://gitlab.com/phoenix-dvpmt/mmoitems.git
synced 2025-01-03 06:37:47 +01:00
Fixed the references being the same, allowing for fixed repairing to fix this bug!
This commit is contained in:
parent
99e893801d
commit
2ab60231b0
@ -36,7 +36,7 @@ public class RepairPower extends DoubleStat implements ConsumableItemInteraction
|
|||||||
|
|
||||||
// Check repair reference
|
// Check repair reference
|
||||||
final Player player = playerData.getPlayer();
|
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);
|
final @Nullable String repairType2 = target.getString(REPAIR_TYPE_TAG);
|
||||||
if (!MMOUtils.checkReference(repairType1, repairType2)) {
|
if (!MMOUtils.checkReference(repairType1, repairType2)) {
|
||||||
Message.UNABLE_TO_REPAIR.format(ChatColor.RED, "#item#", MMOUtils.getDisplayName(target.getItem())).send(player);
|
Message.UNABLE_TO_REPAIR.format(ChatColor.RED, "#item#", MMOUtils.getDisplayName(target.getItem())).send(player);
|
||||||
|
@ -37,7 +37,7 @@ public class RepairPowerPercent extends DoubleStat implements ConsumableItemInte
|
|||||||
|
|
||||||
// Check repair reference
|
// Check repair reference
|
||||||
final Player player = playerData.getPlayer();
|
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);
|
final @Nullable String repairType2 = target.getString(REPAIR_TYPE_TAG);
|
||||||
if (!MMOUtils.checkReference(repairType1, repairType2)) {
|
if (!MMOUtils.checkReference(repairType1, repairType2)) {
|
||||||
Message.UNABLE_TO_REPAIR.format(ChatColor.RED, "#item#", MMOUtils.getDisplayName(target.getItem())).send(player);
|
Message.UNABLE_TO_REPAIR.format(ChatColor.RED, "#item#", MMOUtils.getDisplayName(target.getItem())).send(player);
|
||||||
|
Loading…
Reference in New Issue
Block a user