Skip to content

Commit

Permalink
Fix premium player being invulnerable after using /logout command
Browse files Browse the repository at this point in the history
  • Loading branch information
NikitaCartes committed May 20, 2024
1 parent 6d5de20 commit 1c86e62
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 2 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
### 3.0.25
##### Minecraft 1.20.5-1.20.6

1) Fix premium player being invulnerable after using `/logout` command

### 3.0.24
##### Minecraft 1.20.5-1.20.6

Expand Down
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Mod
mod_name=EasyAuth
mod_id=easyauth
mod_version=3.0.24
mod_version=3.0.25

# Fabric
minecraft_version=1.20.6
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ public static void registerCommand(CommandDispatcher<ServerCommandSource> dispat
private static int logout(ServerCommandSource serverCommandSource) throws CommandSyntaxException {
ServerPlayerEntity player = serverCommandSource.getPlayerOrThrow();

if (((PlayerAuth) player).easyAuth$isAuthenticated()) {
if (((PlayerAuth) player).easyAuth$isAuthenticated() && !((PlayerAuth) player).easyAuth$canSkipAuth()) {
// player.getServer().getPlayerManager().sendToAll(new PlayerListS2CPacket(PlayerListS2CPacket.Action.REMOVE_PLAYER, player));
((PlayerAuth) player).easyAuth$setAuthenticated(false);
((PlayerAuth) player).easyAuth$saveLastLocation(true);
Expand Down

0 comments on commit 1c86e62

Please sign in to comment.