mirror of
https://github.com/darksaid98/Carbon.git
synced 2026-12-04 06:28:53 +00:00
Fix incorrect usage of getItemInMainHand() (#145)
This commit is contained in:
1 parent
a682d0dd59
commit
035c495691
1 file changed
+1
-1
@@ -66,7 +66,7 @@ public final class CarbonPlayerBukkit extends CarbonPlayerCommon {
|
|||||||
if (mainHand != null && !mainHand.getType().isAir()) {
|
if (mainHand != null && !mainHand.getType().isAir()) {
|
||||||
itemStack = mainHand;
|
itemStack = mainHand;
|
||||||
} else {
|
} else {
|
||||||
final @Nullable ItemStack offHand = player.getInventory().getItemInMainHand();
|
final @Nullable ItemStack offHand = player.getInventory().getItemInOffHand();
|
||||||
|
|
||||||
if (offHand != null && !offHand.getType().isAir()) {
|
if (offHand != null && !offHand.getType().isAir()) {
|
||||||
itemStack = offHand;
|
itemStack = offHand;
|
||||||
|
|||||||
Reference in new issue
Block a user