I'm looking for similar event like sales_order_shipment_save_after
and sales_order_shipment_save_before
in Magento1.
Oh I am using Magento 2.1.3.
I tried
<?xml version="1.0"?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:Event/etc/events.xsd">
<event name="sales_order_shipment_save_before">
<observer name="poczta_beforeshipment" instance="Test\Poczta\Observer\BeforeShipment" />
</event>
<event name="sales_order_shipment_save_after">
<observer name="pocztapolska_aftershipment" instance="Test\Poczta\Observer\AfterShipment" />
</event>
</config>
But it is not working. I tried find it here https://cyrillschumacher.com/magento2-list-of-all-dispatched-events/ but I'm not sure what one is a correct.
Should I use observer via di instead event observer? http://blog.chapagain.com.np/magento-2-before-after-method-event-observer-using-plugin/
etc/adminhtml
folder:app/code/Vendor/Module/etc/adminhtml/events.xml