From a58ba406eb6f9308c6c419dc592971c342c26228 Mon Sep 17 00:00:00 2001 From: pop4959 Date: Tue, 12 May 2020 21:26:24 -0700 Subject: [PATCH] Add offhand slot to invsee equip (#3265) --- .../src/com/earth2me/essentials/commands/Commandinvsee.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Essentials/src/com/earth2me/essentials/commands/Commandinvsee.java b/Essentials/src/com/earth2me/essentials/commands/Commandinvsee.java index ddf2857b3..3215f6c92 100644 --- a/Essentials/src/com/earth2me/essentials/commands/Commandinvsee.java +++ b/Essentials/src/com/earth2me/essentials/commands/Commandinvsee.java @@ -1,6 +1,7 @@ package com.earth2me.essentials.commands; import com.earth2me.essentials.User; +import com.earth2me.essentials.utils.VersionUtil; import org.bukkit.Server; import org.bukkit.inventory.Inventory; @@ -25,6 +26,9 @@ public class Commandinvsee extends EssentialsCommand { if (args.length > 1 && user.isAuthorized("essentials.invsee.equip")) { inv = server.createInventory(invUser.getBase(), 9, "Equipped"); inv.setContents(invUser.getBase().getInventory().getArmorContents()); + if (VersionUtil.getServerBukkitVersion().isHigherThanOrEqualTo(VersionUtil.v1_9_4_R01)) { + inv.setItem(4, invUser.getBase().getInventory().getItemInOffHand()); + } } else { inv = invUser.getBase().getInventory(); }