parent
af1c51bf73
commit
ddb5fb22cd
|
@ -7,7 +7,7 @@ Requires Fabric API.
|
|||
|
||||
## Setup
|
||||
|
||||
1. Clone the repository.
|
||||
1. Clone the repository. Then run `./gradlew genSources`
|
||||
2. Edit the code you want.
|
||||
3. To build run the following command:
|
||||
|
||||
|
|
|
@ -34,7 +34,7 @@ public class SimpleAuth implements DedicatedServerModInitializer {
|
|||
|
||||
public static SimpleAuthDatabase db = new SimpleAuthDatabase();
|
||||
|
||||
// HashSet of players that are not authenticated
|
||||
// HashMap of players that are not authenticated
|
||||
// Rather than storing all the authenticated players, we just store ones that are not authenticated
|
||||
public static HashMap<PlayerEntity, Integer> deauthenticatedUsers = new HashMap<>();
|
||||
|
||||
|
|
|
@ -37,7 +37,6 @@ public class LoginCommand {
|
|||
// Method called for checking the password
|
||||
private static int login(ServerCommandSource source, String pass) throws CommandSyntaxException {
|
||||
// Getting the player who send the command
|
||||
System.out.println(maxLoginTries);
|
||||
ServerPlayerEntity player = source.getPlayer();
|
||||
|
||||
if(SimpleAuth.isAuthenticated(player)) {
|
||||
|
|
|
@ -70,12 +70,12 @@ public class AuthConfig {
|
|||
public String enterNewPassword = "§4You need to enter new password!";
|
||||
public String wrongPassword = "§4Wrong password!";
|
||||
public String matchPassword = "§6Passwords must match!";
|
||||
public String passwordUpdated = "§4Your password was updated successfully!";
|
||||
public String passwordUpdated = "§aYour password was updated successfully!";
|
||||
public String loginRequired = "§cYou are not authenticated!\n§6Use /login to authenticate!";
|
||||
public String loginTriesExceeded = "§4Too many login tries.";
|
||||
public String globalPasswordSet = "§aGlobal password was successfully set!";
|
||||
public String cannotChangePassword = "§aYou cannot change password!";
|
||||
public String cannotUnregister = "§aYou cannot unregister this account!";
|
||||
public String cannotChangePassword = "§6You cannot change password!";
|
||||
public String cannotUnregister = "§6You cannot unregister this account!";
|
||||
public String notAuthenticated = "§cYou are not authenticated!\n§6Try with /login or /register.";
|
||||
public String alreadyAuthenticated = "§6You are already authenticated.";
|
||||
public String successfullyAuthenticated = "§aYou are now authenticated.";
|
||||
|
@ -85,7 +85,7 @@ public class AuthConfig {
|
|||
public String registerSuccess = "§aYou are now authenticated.";
|
||||
public String userdataDeleted = "§aUserdata deleted.";
|
||||
public String userdataUpdated = "§aUserdata updated.";
|
||||
public String accountDeleted = "§4Your account was successfully deleted!";
|
||||
public String accountDeleted = "§aYour account was successfully deleted!";
|
||||
public String configurationReloaded = "§aConfiguration file was reloaded successfully.";
|
||||
}
|
||||
private static final Logger LOGGER = LogManager.getLogger();
|
||||
|
|
Loading…
Reference in New Issue