package net.minecraft.world.item; import javax.annotation.Nullable; import net.minecraft.world.entity.player.Player; import net.minecraft.world.level.block.state.BlockState; import net.minecraft.world.level.block.Block; public class GameMasterBlockItem extends BlockItem { public GameMasterBlockItem(final Block bpe, final Properties a) { super(bpe, a); } @Nullable @Override protected BlockState getPlacementState(final BlockPlaceContext bcn) { final Player ayg3 = bcn.getPlayer(); return (ayg3 == null || ayg3.canUseGameMasterBlocks()) ? super.getPlacementState(bcn) : null; } }