Correct event handling for dispensing filled buckets. Fixes BUKKIT-4046

We only go through event creation and calling when dispensing filled buckets
if the bucket is able to place its liquid. However, the check for this is
incorrect so the event is not called when a block liquids can destroy is
in front of the dispenser. This commit fixes the check to match the checks
vanilla does when actually using the bucket.

Remapped by Srg2Source from Bukkit/CraftBukkit@33342ecc471d3923e3c7d2eec2a0444b5489b9f1