From fae3b80488c02e803d1d3e81437f767c71a6f2d2 Mon Sep 17 00:00:00 2001 From: Brianna Date: Tue, 28 Jul 2020 14:17:28 -0500 Subject: [PATCH] Can't use MainHand if we want to support 1.8. --- .../songoda/ultimaterepairing/handlers/RepairHandler.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/main/java/com/songoda/ultimaterepairing/handlers/RepairHandler.java b/src/main/java/com/songoda/ultimaterepairing/handlers/RepairHandler.java index b33825c..7ae60b8 100644 --- a/src/main/java/com/songoda/ultimaterepairing/handlers/RepairHandler.java +++ b/src/main/java/com/songoda/ultimaterepairing/handlers/RepairHandler.java @@ -55,8 +55,8 @@ public class RepairHandler { EntityEquipment equipment = player.getEquipment(); if (equipment != null) { - if (equipment.getItemInMainHand().equals(itemStack)) { - equipment.setItemInMainHand(null); + if (equipment.getItemInHand().equals(itemStack)) { + equipment.setItemInHand(null); playerData.setSlot(EquipmentSlot.HAND); } else if (itemStack.equals(equipment.getHelmet())) { equipment.setHelmet(null); @@ -242,7 +242,7 @@ public class RepairHandler { ItemStack item = playerData.getToBeRepaired(); switch (slot) { case HAND: - equipment.setItemInMainHand(item); + equipment.setItemInHand(item); break; case OFF_HAND: equipment.setItemInOffHand(item);