Jump to content

strega

Members
  • Posts

    3
  • Joined

  • Last visited

strega's Achievements

Tree Puncher

Tree Puncher (2/8)

1

Reputation

  1. Okay, I checked this method and everything works! Thanks!
  2. Hi! I tried the above method, but it did not work. There's my function. The message appears in the chat, but the item is not added to the inventory. I can’t figure out what the problem is, so please help. @SubscribeEvent public void onJoin(EntityJoinLevelEvent event) { if (event.getEntity() instanceof Player && event.getEntity().getCommandSenderWorld().isClientSide) { Minecraft.getInstance().player.getInventory().add(new ItemStack(Items.CARROT)); Entity playerEntity = event.getEntity(); playerEntity.sendSystemMessage(Component.nullToEmpty("Hello!")); } }
  3. Hi, i want to add an item to player's inventory when specific event is fired, but i don't know how to do that
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.