mirror of
https://github.com/NoCheatPlus/NoCheatPlus.git
synced 2025-01-15 12:01:51 +01:00
Add exception for MILK_BUCKET.
This commit is contained in:
parent
552beed739
commit
2257ac2f71
@ -224,7 +224,6 @@ public class InventoryListener extends CheckListener implements JoinLeaveListen
|
|||||||
|
|
||||||
boolean resetAll = false;
|
boolean resetAll = false;
|
||||||
|
|
||||||
|
|
||||||
if (event.hasItem()){
|
if (event.hasItem()){
|
||||||
final ItemStack item = event.getItem();
|
final ItemStack item = event.getItem();
|
||||||
final Material type = item.getType();
|
final Material type = item.getType();
|
||||||
@ -234,7 +233,7 @@ public class InventoryListener extends CheckListener implements JoinLeaveListen
|
|||||||
// It was a bow, the player starts to pull the string, remember this time.
|
// It was a bow, the player starts to pull the string, remember this time.
|
||||||
data.instantBowInteract = (data.instantBowInteract > 0 && now - data.instantBowInteract < 800) ? Math.min(System.currentTimeMillis(), data.instantBowInteract) : System.currentTimeMillis();
|
data.instantBowInteract = (data.instantBowInteract > 0 && now - data.instantBowInteract < 800) ? Math.min(System.currentTimeMillis(), data.instantBowInteract) : System.currentTimeMillis();
|
||||||
}
|
}
|
||||||
else if (type.isEdible() || type == Material.POTION) {
|
else if (type.isEdible() || type == Material.POTION || type == Material.MILK_BUCKET) {
|
||||||
final long now = System.currentTimeMillis();
|
final long now = System.currentTimeMillis();
|
||||||
// It was food, the player starts to eat some food, remember this time and the type of food.
|
// It was food, the player starts to eat some food, remember this time and the type of food.
|
||||||
data.instantEatFood = type;
|
data.instantEatFood = type;
|
||||||
|
Loading…
Reference in New Issue
Block a user