Skip to content

Commit

Permalink
Make tip more helpful
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexProgrammerDE committed Jan 31, 2025
1 parent 3e7edd9 commit 9be8667
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
import com.soulfiremc.server.api.Plugin;
import com.soulfiremc.server.api.SoulFireAPI;
import com.soulfiremc.server.brigadier.ServerConsoleCommandSource;
import com.soulfiremc.server.user.AuthSystem;
import com.soulfiremc.server.util.PortHelper;
import com.soulfiremc.server.util.SFPathConstants;
import lombok.extern.slf4j.Slf4j;
Expand Down Expand Up @@ -52,7 +53,9 @@ protected void postMixinMain(String[] args) {
var soulFire =
new SoulFireServer(host, port, pluginManager, START_TIME, getBaseDirectory());

log.info("Tip: The default user is called 'root', you can log into it using the client");
if (soulFire.authSystem().rootUserData().email().equals(AuthSystem.ROOT_DEFAULT_EMAIL)) {
log.info("The root users email is '{}', please change it using the command 'set-email <email>', you can login with the client using that email", AuthSystem.ROOT_DEFAULT_EMAIL);
}

var commandManager = soulFire.injector().getSingleton(ServerCommandManager.class);
var commandSource = new ServerConsoleCommandSource(soulFire.authSystem());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
@Getter
@Slf4j
public class AuthSystem {
private static final String ROOT_DEFAULT_EMAIL = "[email protected]";
public static final String ROOT_DEFAULT_EMAIL = "[email protected]";
private static final String ROOT_USERNAME = "root";
private final LogServiceImpl logService;
private final SessionFactory sessionFactory;
Expand Down

0 comments on commit 9be8667

Please sign in to comment.