Fix share item command
This commit is contained in:
parent
90b90ea53c
commit
875e557fad
1 changed files with 1 additions and 1 deletions
|
@ -14,7 +14,7 @@ public class ShareItemCommand {
|
|||
|
||||
public static int execute(CommandSourceStack ctx) {
|
||||
Player player = (Player) ctx.getSender();
|
||||
ItemStack hand = player.getActiveItem();
|
||||
ItemStack hand = player.getInventory().getItemInMainHand();
|
||||
if (hand.isEmpty()) {
|
||||
player.sendMessage(
|
||||
Component.text("You cannot share air in chat.", NamedTextColor.DARK_RED));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue