Disable ticking player if not authenticated
This commit is contained in:
parent
c4ea00194a
commit
561e3784c9
|
@ -194,7 +194,7 @@ public abstract class MixinPlayerEntity implements PlayerAuth {
|
|||
return playerCacheMap.containsKey(uuid) && playerCacheMap.get(uuid).isAuthenticated;
|
||||
}
|
||||
|
||||
@Inject(method = "tick()V", at = @At("HEAD"))
|
||||
@Inject(method = "tick()V", at = @At("HEAD"), cancellable = true)
|
||||
private void tick(CallbackInfo ci) {
|
||||
if(!this.isAuthenticated()) {
|
||||
// Checking player timer
|
||||
|
@ -207,6 +207,7 @@ public abstract class MixinPlayerEntity implements PlayerAuth {
|
|||
player.sendMessage(this.getAuthMessage(), false);
|
||||
kickTimer--;
|
||||
}
|
||||
ci.cancel();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue