1
0
mirror of https://github.com/Zrips/Jobs.git synced 2025-01-07 00:38:42 +01:00

Correct cows milking

This commit is contained in:
montlikadani 2020-04-13 15:58:11 +02:00
parent 7cd0423647
commit a9c94d36d8

View File

@ -204,9 +204,14 @@ public class JobsPaymentListener implements Listener {
return;
ItemStack itemInHand = Jobs.getNms().getItemInMainHand(player);
if (itemInHand == null || (itemInHand.getType() != Material.BUCKET && itemInHand.getType() != Material.BOWL))
if (itemInHand == null)
return;
if ((cow.getType() == EntityType.COW && itemInHand.getType() != Material.BUCKET)
|| (cow.getType() == EntityType.MUSHROOM_COW && itemInHand.getType() != Material.BOWL)) {
return;
}
// check if in creative
if (!payIfCreative(player))
return;