diff --git a/Plan/src/main/java/com/djrapitops/plan/systems/processing/player/RegisterProcessor.java b/Plan/src/main/java/com/djrapitops/plan/systems/processing/player/RegisterProcessor.java index f09f9dba3..bad49c9e3 100644 --- a/Plan/src/main/java/com/djrapitops/plan/systems/processing/player/RegisterProcessor.java +++ b/Plan/src/main/java/com/djrapitops/plan/systems/processing/player/RegisterProcessor.java @@ -52,10 +52,10 @@ public class RegisterProcessor extends PlayerProcessor { if (db.getActionsTable().getActions(uuid).size() > 0) { return; } - plugin.getDataCache().markFirstSession(uuid); - if (userInfoTable.isRegistered(uuid)) { + if (!userInfoTable.isRegistered(uuid)) { userInfoTable.registerUserInfo(uuid, registered); } + plugin.getDataCache().markFirstSession(uuid); db.getActionsTable().insertAction(uuid, new Action(time, Actions.FIRST_SESSION, "Online: " + playersOnline + " Players")); } catch (SQLException e) { Log.toLog(this.getClass().getName(), e); diff --git a/Plan/test/main/java/com/djrapitops/plan/database/DatabaseTest.java b/Plan/test/main/java/com/djrapitops/plan/database/DatabaseTest.java index be14a4597..539b69365 100644 --- a/Plan/test/main/java/com/djrapitops/plan/database/DatabaseTest.java +++ b/Plan/test/main/java/com/djrapitops/plan/database/DatabaseTest.java @@ -863,6 +863,8 @@ public class DatabaseTest { @Test public void testRegisterProcessorRegisterException() throws SQLException { + assertFalse(db.getUsersTable().isRegistered(uuid)); + assertFalse(db.getUserInfoTable().isRegistered(uuid)); for (int i = 0; i < 200; i++) { new RegisterProcessor(uuid, 500L, 1000L, "name", 4).process(); }