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