mirror of
https://github.com/plan-player-analytics/Plan.git
synced 2025-02-04 14:31:34 +01:00
Remove unnecessary != null check
This commit is contained in:
parent
d45b0f426e
commit
3094079a80
@ -117,8 +117,7 @@ class SaveConsumer extends Consumer<UserData> {
|
||||
db.saveUserData(data);
|
||||
data.stopAccessing();
|
||||
Log.debug(uuid + ": Saved!");
|
||||
if (data.shouldClearAfterSave()
|
||||
&& handler != null) {
|
||||
if (data.shouldClearAfterSave()) {
|
||||
handler.getClearTask().scheduleForClear(uuid);
|
||||
}
|
||||
} catch (SQLException ex) {
|
||||
|
@ -11,6 +11,13 @@ import main.java.com.djrapitops.plan.data.UserData;
|
||||
*/
|
||||
public class LogoutHandling {
|
||||
|
||||
/**
|
||||
* Constructor used to hide the public constructor
|
||||
*/
|
||||
private LogoutHandling() {
|
||||
throw new IllegalStateException("Utility class");
|
||||
}
|
||||
|
||||
/**
|
||||
* Processes the information of the Event and changes UserData object
|
||||
* accordingly.
|
||||
|
@ -6,6 +6,13 @@ import main.java.com.djrapitops.plan.data.time.WorldTimes;
|
||||
|
||||
public class PlaytimeHandling {
|
||||
|
||||
/**
|
||||
* Constructor used to hide the public constructor
|
||||
*/
|
||||
private PlaytimeHandling() {
|
||||
throw new IllegalStateException("Utility class");
|
||||
}
|
||||
|
||||
public static void processPlaytimeDependentInfo(UserData data, long time, String gamemode, String worldName) {
|
||||
long diff = time - data.getLastPlayed();
|
||||
long playTime = data.getPlayTime() + diff;
|
||||
|
@ -16,6 +16,13 @@ import static org.bukkit.Bukkit.getPluginManager;
|
||||
*/
|
||||
public class ImportUtils {
|
||||
|
||||
/**
|
||||
* Constructor used to hide the public constructor
|
||||
*/
|
||||
private ImportUtils() {
|
||||
throw new IllegalStateException("Utility class");
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks if a plugin is enabled.
|
||||
*
|
||||
|
Loading…
Reference in New Issue
Block a user