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:
parent
7cd0423647
commit
a9c94d36d8
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user