Example plugin: https://pastebin.com/WPhqnz1q
This will successfully prevent any item action from starting on the server (eg. trident charging or food consumption will be prevented), but the client is never updated and assumes that the item action was successfully started. As long as the player is still holding down the right mouse button with the item in hand, it will play the trident charging animation or the food eating animation/particels.