mirror of
https://github.com/NoCheatPlus/NoCheatPlus.git
synced 2024-06-28 23:34:43 +02:00
Log resetting of fastconsume data for the obvious spots.
This commit is contained in:
parent
e926f34963
commit
380ed8a185
|
@ -147,6 +147,9 @@ public class FastConsume extends Check implements Listener, INotifyReload {
|
||||||
data.instantEatFood = actualStack == null ? null : actualStack.getType();
|
data.instantEatFood = actualStack == null ? null : actualStack.getType();
|
||||||
// TODO: Allows some abuse: 1. try instantly eat (cancelled) 2. consume item directly when needed.
|
// TODO: Allows some abuse: 1. try instantly eat (cancelled) 2. consume item directly when needed.
|
||||||
} else {
|
} else {
|
||||||
|
if (data.debug) {
|
||||||
|
debug(player, "PlayerItemConsumeEvent, reset fastconsume: " + data.instantEatFood);
|
||||||
|
}
|
||||||
data.instantEatFood = null;
|
data.instantEatFood = null;
|
||||||
}
|
}
|
||||||
data.instantEatInteract = time;
|
data.instantEatInteract = time;
|
||||||
|
|
|
@ -351,6 +351,9 @@ public class InventoryListener extends CheckListener implements JoinLeaveListen
|
||||||
|
|
||||||
if (resetAll) {
|
if (resetAll) {
|
||||||
// Nothing that we are interested in, reset data.
|
// Nothing that we are interested in, reset data.
|
||||||
|
if (data.debug && data.instantEatFood != null) {
|
||||||
|
debug(player, "PlayerInteractEvent, reset fastconsume (legacy: instanteat).");
|
||||||
|
}
|
||||||
data.instantBowInteract = 0;
|
data.instantBowInteract = 0;
|
||||||
data.instantEatInteract = 0;
|
data.instantEatInteract = 0;
|
||||||
data.instantEatFood = null;
|
data.instantEatFood = null;
|
||||||
|
@ -385,6 +388,9 @@ public class InventoryListener extends CheckListener implements JoinLeaveListen
|
||||||
public void onItemHeldChange(final PlayerItemHeldEvent event) {
|
public void onItemHeldChange(final PlayerItemHeldEvent event) {
|
||||||
final Player player = event.getPlayer();
|
final Player player = event.getPlayer();
|
||||||
final InventoryData data = InventoryData.getData(player);
|
final InventoryData data = InventoryData.getData(player);
|
||||||
|
if (data.debug && data.instantEatFood != null) {
|
||||||
|
debug(player, "PlayerItemHeldEvent, reset fastconsume (legacy: instanteat).");
|
||||||
|
}
|
||||||
data.instantBowInteract = 0;
|
data.instantBowInteract = 0;
|
||||||
data.instantEatInteract = 0;
|
data.instantEatInteract = 0;
|
||||||
data.instantEatFood = null;
|
data.instantEatFood = null;
|
||||||
|
|
Loading…
Reference in New Issue
Block a user