forked from TuxCoding/FastLogin
Mention the new FastLogin module names in the setup guide
This commit is contained in:
@@ -64,8 +64,8 @@ So they don't need to enter passwords. This is also called auto login (auto-logi
|
|||||||
|
|
||||||
#### Bukkit/Spigot/Paper
|
#### Bukkit/Spigot/Paper
|
||||||
|
|
||||||
1. Download and install ProtocolLib
|
1. Download and install ProtocolLib/ProtocolSupport
|
||||||
2. Download and install FastLogin
|
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
|
3. Set your server in offline mode by setting the value onlinemode in your server.properties to false
|
||||||
|
|
||||||
#### BungeeCord/Waterfall
|
#### 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
|
3. Now there is proxy-whitelist file in the FastLogin folder
|
||||||
Put your stats id from the BungeeCord config into this file
|
Put your stats id from the BungeeCord config into this file
|
||||||
4. Activate ipForward in your BungeeCord config
|
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
|
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
|
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
|
8. You should *always* firewall your Spigot server that it's only accessible through BungeeCord
|
||||||
|
@@ -94,6 +94,7 @@
|
|||||||
</repositories>
|
</repositories>
|
||||||
|
|
||||||
<dependencies>
|
<dependencies>
|
||||||
|
<!--Common plugin component-->
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>com.github.games647</groupId>
|
<groupId>com.github.games647</groupId>
|
||||||
<artifactId>fastlogin.core</artifactId>
|
<artifactId>fastlogin.core</artifactId>
|
||||||
@@ -116,6 +117,7 @@
|
|||||||
<scope>provided</scope>
|
<scope>provided</scope>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
|
<!--Changing onlinemode on login process-->
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>com.github.ProtocolSupport</groupId>
|
<groupId>com.github.ProtocolSupport</groupId>
|
||||||
<artifactId>ProtocolSupport</artifactId>
|
<artifactId>ProtocolSupport</artifactId>
|
||||||
@@ -124,6 +126,7 @@
|
|||||||
<scope>provided</scope>
|
<scope>provided</scope>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
|
<!--Provide premium placeholders-->
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>me.clip</groupId>
|
<groupId>me.clip</groupId>
|
||||||
<artifactId>placeholderapi</artifactId>
|
<artifactId>placeholderapi</artifactId>
|
||||||
|
@@ -42,11 +42,11 @@ public class AuthMeHook implements AuthPlugin<Player>, Listener {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean forceLogin(Player player) {
|
public boolean forceLogin(Player player) {
|
||||||
//skips registration and login
|
|
||||||
if (AuthMeApi.getInstance().isAuthenticated(player)) {
|
if (AuthMeApi.getInstance().isAuthenticated(player)) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//skips registration and login
|
||||||
AuthMeApi.getInstance().forceLogin(player);
|
AuthMeApi.getInstance().forceLogin(player);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
@@ -58,7 +58,7 @@ public class AuthMeHook implements AuthPlugin<Player>, Listener {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean forceRegister(Player player, String password) {
|
public boolean forceRegister(Player player, String password) {
|
||||||
//this automatically registers the player too
|
//this automatically login the player too
|
||||||
AuthMeApi.getInstance().forceRegister(player, password);
|
AuthMeApi.getInstance().forceRegister(player, password);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
@@ -33,13 +33,13 @@ public class ForceLoginTask extends ForceLoginManagement<Player, CommandSender,
|
|||||||
FastLoginBukkit plugin = core.getPlugin();
|
FastLoginBukkit plugin = core.getPlugin();
|
||||||
player.setMetadata(core.getPlugin().getName(), new FixedMetadataValue(plugin, true));
|
player.setMetadata(core.getPlugin().getName(), new FixedMetadataValue(plugin, true));
|
||||||
|
|
||||||
|
super.run();
|
||||||
|
|
||||||
if (isOnlineMode()) {
|
if (isOnlineMode()) {
|
||||||
plugin.getPremiumPlayers().put(player.getUniqueId(), PremiumStatus.PREMIUM);
|
plugin.getPremiumPlayers().put(player.getUniqueId(), PremiumStatus.PREMIUM);
|
||||||
} else {
|
} else {
|
||||||
plugin.getPremiumPlayers().put(player.getUniqueId(), PremiumStatus.CRACKED);
|
plugin.getPremiumPlayers().put(player.getUniqueId(), PremiumStatus.CRACKED);
|
||||||
}
|
}
|
||||||
|
|
||||||
super.run();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@@ -68,6 +68,7 @@
|
|||||||
</repositories>
|
</repositories>
|
||||||
|
|
||||||
<dependencies>
|
<dependencies>
|
||||||
|
<!--Common plugin component-->
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>${project.groupId}</groupId>
|
<groupId>${project.groupId}</groupId>
|
||||||
<artifactId>fastlogin.core</artifactId>
|
<artifactId>fastlogin.core</artifactId>
|
||||||
@@ -82,6 +83,7 @@
|
|||||||
<scope>provided</scope>
|
<scope>provided</scope>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
|
<!--Login plugin-->
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>me.vik1395</groupId>
|
<groupId>me.vik1395</groupId>
|
||||||
<artifactId>BungeeAuth</artifactId>
|
<artifactId>BungeeAuth</artifactId>
|
||||||
|
@@ -63,6 +63,7 @@
|
|||||||
</exclusions>
|
</exclusions>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
|
<!--Common component for contacting the Mojang API-->
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>com.github.games647</groupId>
|
<groupId>com.github.games647</groupId>
|
||||||
<artifactId>craftapi</artifactId>
|
<artifactId>craftapi</artifactId>
|
||||||
|
@@ -2,9 +2,11 @@ package com.github.games647.fastlogin.core.hooks;
|
|||||||
|
|
||||||
import java.security.SecureRandom;
|
import java.security.SecureRandom;
|
||||||
import java.util.Random;
|
import java.util.Random;
|
||||||
|
import java.util.stream.IntStream;
|
||||||
|
|
||||||
public class DefaultPasswordGenerator<P> implements PasswordGenerator<P> {
|
public class DefaultPasswordGenerator<P> implements PasswordGenerator<P> {
|
||||||
|
|
||||||
|
private static final int PASSWORD_LENGTH = 8;
|
||||||
private static final char[] PASSWORD_CHARACTERS = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789"
|
private static final char[] PASSWORD_CHARACTERS = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789"
|
||||||
.toCharArray();
|
.toCharArray();
|
||||||
|
|
||||||
@@ -13,9 +15,10 @@ public class DefaultPasswordGenerator<P> implements PasswordGenerator<P> {
|
|||||||
@Override
|
@Override
|
||||||
public String getRandomPassword(P player) {
|
public String getRandomPassword(P player) {
|
||||||
StringBuilder generatedPassword = new StringBuilder(8);
|
StringBuilder generatedPassword = new StringBuilder(8);
|
||||||
for (int i = 1; i <= 8; i++) {
|
IntStream.rangeClosed(1, PASSWORD_LENGTH)
|
||||||
generatedPassword.append(PASSWORD_CHARACTERS[random.nextInt(PASSWORD_CHARACTERS.length - 1)]);
|
.map(i -> random.nextInt(PASSWORD_CHARACTERS.length - 1))
|
||||||
}
|
.mapToObj(pos -> PASSWORD_CHARACTERS[pos])
|
||||||
|
.forEach(generatedPassword::append);
|
||||||
|
|
||||||
return generatedPassword.toString();
|
return generatedPassword.toString();
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user