if (!targetType.canOverride(target, face, holding)) {
return;
}
}
GlowBlockState newState = target.getState();
PlayerBucketEmptyEvent event = EventFactory.callEvent(new PlayerBucketEmptyEvent(player, target, face, holding.getType(), holding));
if (event.isCancelled()) {
return;
}
liquid.placeBlock(player, newState, face, holding, clickedLoc);
// perform the block change
newState.update(true);
// deduct from stack if not in creative mode
if (player.getGameMode() != GameMode.CREATIVE) {
holding.setType(Material.BUCKET);
}