Mention the new FastLogin module names in the setup guide

This commit is contained in:
games647
2018-03-31 10:34:26 +02:00
parent 82ec71e8d0
commit f2e42019d6
7 changed files with 20 additions and 10 deletions

View File

@ -64,8 +64,8 @@ So they don't need to enter passwords. This is also called auto login (auto-logi
#### Bukkit/Spigot/Paper
1. Download and install ProtocolLib
2. Download and install FastLogin
1. Download and install ProtocolLib/ProtocolSupport
2. Download and install FastLogin (or FastLoginBukkit for newer versions)
3. Set your server in offline mode by setting the value onlinemode in your server.properties to false
#### BungeeCord/Waterfall
@ -75,7 +75,8 @@ So they don't need to enter passwords. This is also called auto login (auto-logi
3. Now there is proxy-whitelist file in the FastLogin folder
Put your stats id from the BungeeCord config into this file
4. Activate ipForward in your BungeeCord config
5. Download and Install FastLogin on BungeeCord AND Spigot (on the servers where your login plugin is)
5. Download and Install FastLogin (or FastLoginBungee in newer versions) on BungeeCord AND Spigot
(on the servers where your login plugin is or where player should be able to execute the commands of FastLogin)
6. Check your database settings in the config of FastLogin on BungeeCord
7. Set your proxy (BungeeCord) in offline mode by setting the value onlinemode in your config.yml to false
8. You should *always* firewall your Spigot server that it's only accessible through BungeeCord

View File

@ -94,6 +94,7 @@
</repositories>
<dependencies>
<!--Common plugin component-->
<dependency>
<groupId>com.github.games647</groupId>
<artifactId>fastlogin.core</artifactId>
@ -116,6 +117,7 @@
<scope>provided</scope>
</dependency>
<!--Changing onlinemode on login process-->
<dependency>
<groupId>com.github.ProtocolSupport</groupId>
<artifactId>ProtocolSupport</artifactId>
@ -124,6 +126,7 @@
<scope>provided</scope>
</dependency>
<!--Provide premium placeholders-->
<dependency>
<groupId>me.clip</groupId>
<artifactId>placeholderapi</artifactId>

View File

@ -42,11 +42,11 @@ public class AuthMeHook implements AuthPlugin<Player>, Listener {
@Override
public boolean forceLogin(Player player) {
//skips registration and login
if (AuthMeApi.getInstance().isAuthenticated(player)) {
return false;
}
//skips registration and login
AuthMeApi.getInstance().forceLogin(player);
return true;
}
@ -58,7 +58,7 @@ public class AuthMeHook implements AuthPlugin<Player>, Listener {
@Override
public boolean forceRegister(Player player, String password) {
//this automatically registers the player too
//this automatically login the player too
AuthMeApi.getInstance().forceRegister(player, password);
return true;
}

View File

@ -33,13 +33,13 @@ public class ForceLoginTask extends ForceLoginManagement<Player, CommandSender,
FastLoginBukkit plugin = core.getPlugin();
player.setMetadata(core.getPlugin().getName(), new FixedMetadataValue(plugin, true));
super.run();
if (isOnlineMode()) {
plugin.getPremiumPlayers().put(player.getUniqueId(), PremiumStatus.PREMIUM);
} else {
plugin.getPremiumPlayers().put(player.getUniqueId(), PremiumStatus.CRACKED);
}
super.run();
}
@Override

View File

@ -68,6 +68,7 @@
</repositories>
<dependencies>
<!--Common plugin component-->
<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>fastlogin.core</artifactId>
@ -82,6 +83,7 @@
<scope>provided</scope>
</dependency>
<!--Login plugin-->
<dependency>
<groupId>me.vik1395</groupId>
<artifactId>BungeeAuth</artifactId>

View File

@ -63,6 +63,7 @@
</exclusions>
</dependency>
<!--Common component for contacting the Mojang API-->
<dependency>
<groupId>com.github.games647</groupId>
<artifactId>craftapi</artifactId>

View File

@ -2,9 +2,11 @@ package com.github.games647.fastlogin.core.hooks;
import java.security.SecureRandom;
import java.util.Random;
import java.util.stream.IntStream;
public class DefaultPasswordGenerator<P> implements PasswordGenerator<P> {
private static final int PASSWORD_LENGTH = 8;
private static final char[] PASSWORD_CHARACTERS = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789"
.toCharArray();
@ -13,9 +15,10 @@ public class DefaultPasswordGenerator<P> implements PasswordGenerator<P> {
@Override
public String getRandomPassword(P player) {
StringBuilder generatedPassword = new StringBuilder(8);
for (int i = 1; i <= 8; i++) {
generatedPassword.append(PASSWORD_CHARACTERS[random.nextInt(PASSWORD_CHARACTERS.length - 1)]);
}
IntStream.rangeClosed(1, PASSWORD_LENGTH)
.map(i -> random.nextInt(PASSWORD_CHARACTERS.length - 1))
.mapToObj(pos -> PASSWORD_CHARACTERS[pos])
.forEach(generatedPassword::append);
return generatedPassword.toString();
}