mirror of
https://github.com/TotalFreedomMC/TF-EssentialsX.git
synced 2025-01-03 22:08:28 +00:00
Add offhand slot to invsee equip (#3265)
This commit is contained in:
parent
a93ca9b7bc
commit
a58ba406eb
1 changed files with 4 additions and 0 deletions
|
@ -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();
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue