Cancel interaction for players who are not online.
This commit is contained in:
parent
afe080f1c2
commit
7e43deaa28
|
@ -91,6 +91,7 @@ public class BlockInteractListener extends CheckListener {
|
|||
|
||||
private final Counters counters = NCPAPIProvider.getNoCheatPlusAPI().getGenericInstance(Counters.class);
|
||||
private final int idCancelDead = counters.registerKey("cancel.dead");
|
||||
private final int idCancelOffline = counters.registerKey("cancel.offline");
|
||||
private final int idInteractLookCurrent = counters.registerKey("block.interact.look.current");
|
||||
private final int idInteractLookFlyingFirst = counters.registerKey("block.interact.look.flying.first");
|
||||
private final int idInteractLookFlyingOther = counters.registerKey("block.interact.look.flying.other");
|
||||
|
@ -120,6 +121,9 @@ public class BlockInteractListener extends CheckListener {
|
|||
*/
|
||||
cancelId = idCancelDead;
|
||||
}
|
||||
else if (!player.isOnline()) {
|
||||
cancelId = idCancelOffline;
|
||||
}
|
||||
else if (MovingUtil.hasScheduledPlayerSetBack(player)) {
|
||||
// Might log.
|
||||
cancelId = -1; // No counters yet, but do prevent.
|
||||
|
|
Loading…
Reference in New Issue