Remove unnecessary != null check

This commit is contained in:
Fuzzlemann 2017-08-03 20:01:43 +02:00
parent d45b0f426e
commit 3094079a80
4 changed files with 22 additions and 2 deletions

View File

@ -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) {

View File

@ -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.

View File

@ -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;

View File

@ -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.
*