Skip to content

Commit

Permalink
Update 3.4.8
Browse files Browse the repository at this point in the history
Hotfix for an NPE in the session code, triggered when the player quits before ever being AFK
Fixes #85
  • Loading branch information
Dart2112 committed Feb 1, 2025
1 parent 0c48f0d commit c5cd69f
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 4 deletions.
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ plugins {

group = 'net.lapismc'
archivesBaseName = "AFKPlus"
version = '3.4.7'
version = '3.4.8'
description = 'AFK for professional servers'
sourceCompatibility = '17'
targetCompatibility = '17'
Expand Down
5 changes: 4 additions & 1 deletion src/main/java/net/lapismc/afkplus/playerdata/AFKSession.java
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,10 @@ public AFKSession(AFKPlus plugin, AFKPlusPlayer player) {
this.plugin = plugin;
playerUUID = player.getUUID();
isAFK = player.isAFK();
relativeAFKStart = System.currentTimeMillis() - player.getAFKStart();
if (player.getAFKStart() != null)
relativeAFKStart = System.currentTimeMillis() - player.getAFKStart();
else
relativeAFKStart = 0L;
isFakeAFK = player.isFakeAFK();
isWarned = player.isWarned();
isInactive = player.isInactive();
Expand Down
Binary file modified updater/AFKPlus/AFKPlus.jar
Binary file not shown.
4 changes: 3 additions & 1 deletion updater/changelog.yml
Original file line number Diff line number Diff line change
Expand Up @@ -167,4 +167,6 @@
- "Updates are now released on Spigot and GitHub Releases"
- "Added warning when the action command doesn't remove a player from the server"
- "Added AFK Sessions which stop players from reconnecting to evade AFK detection and actions"
- "Implemented features that used to be in an add-on, multiple commands can now be entered in the config"
- "Implemented features that used to be in an add-on, multiple commands can now be entered in the config"
3.4.8:
- "Hotfix for an NPE in the session code, triggered when the player quits before ever being AFK"
2 changes: 1 addition & 1 deletion updater/update.yml
Original file line number Diff line number Diff line change
@@ -1 +1 @@
AFKPlus: 3.4.7
AFKPlus: 3.4.8

0 comments on commit c5cd69f

Please sign in to comment.