Interface PlayerEntityEvent.LootContainerOpened

Enclosing interface:
PlayerEntityEvent

public static interface PlayerEntityEvent.LootContainerOpened
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    invoke(net.minecraft.server.network.ServerPlayerEntity player, net.minecraft.block.entity.LootableContainerBlockEntity container)
    A TEvent that is invoked whenever a ServerPlayerEntity opens a container that has a loot-table aka randomly generated loot inside of it.
  • Method Details

    • invoke

      void invoke(net.minecraft.server.network.ServerPlayerEntity player, net.minecraft.block.entity.LootableContainerBlockEntity container)
      A TEvent that is invoked whenever a ServerPlayerEntity opens a container that has a loot-table aka randomly generated loot inside of it. This TEvent will not invoke for any subsequent openings of the same container.
      Parameters:
      player - The ServerPlayerEntity that opened the container.
      container - The opened container.