forked from TuxCoding/FastLogin
Compile the project with Java 7. Many hosters don't have Java 8 yet.
This commit is contained in:
8
pom.xml
8
pom.xml
@ -8,9 +8,9 @@
|
||||
<packaging>jar</packaging>
|
||||
|
||||
<name>FastLogin</name>
|
||||
<version>0.2</version>
|
||||
<version>0.2.2</version>
|
||||
<inceptionYear>2015</inceptionYear>
|
||||
<url>http://dev.bukkit.org/bukkit-plugins/fastlogin</url>
|
||||
<url>https://github.com/games647/FastLogin</url>
|
||||
<description>
|
||||
Automatically logins premium (paid accounts) player on a offline mode server
|
||||
</description>
|
||||
@ -43,8 +43,8 @@
|
||||
<artifactId>maven-compiler-plugin</artifactId>
|
||||
<version>3.2</version>
|
||||
<configuration>
|
||||
<source>1.8</source>
|
||||
<target>1.8</target>
|
||||
<source>1.7</source>
|
||||
<target>1.7</target>
|
||||
<showWarnings>true</showWarnings>
|
||||
<showDeprecation>true</showDeprecation>
|
||||
<!--false means actual true http://jira.codehaus.org/browse/MCOMPILER-209-->
|
||||
|
@ -7,7 +7,7 @@ import org.bukkit.entity.Player;
|
||||
|
||||
/**
|
||||
* Github: https://github.com/Xephi/AuthMeReloaded/
|
||||
* Project page: dev.bukkit.org/bukkit-plugins/authme-reloaded/
|
||||
* Project page: http://dev.bukkit.org/bukkit-plugins/authme-reloaded/
|
||||
*/
|
||||
public class AuthMeHook implements AuthPlugin {
|
||||
|
||||
|
@ -8,7 +8,8 @@ import org.bukkit.entity.Player;
|
||||
* Github: http://dev.bukkit.org/bukkit-plugins/loginsecurity/
|
||||
* Project page: https://github.com/lenis0012/LoginSecurity-2
|
||||
*
|
||||
* on join: https://github.com/lenis0012/LoginSecurity-2/blob/master/src/main/java/com/lenis0012/bukkit/ls/LoginSecurity.java#L282
|
||||
* on join:
|
||||
* https://github.com/lenis0012/LoginSecurity-2/blob/master/src/main/java/com/lenis0012/bukkit/ls/LoginSecurity.java#L282
|
||||
*/
|
||||
public class LoginSecurityHook implements AuthPlugin {
|
||||
|
||||
|
@ -32,10 +32,19 @@ public class PlayerListener implements Listener {
|
||||
//check if it's the same player as we checked before
|
||||
if (session != null && session.getUsername().equals(player.getName())
|
||||
&& session.isVerified()) {
|
||||
Bukkit.getScheduler().runTaskLater(plugin, () -> {
|
||||
if (player.isOnline()) {
|
||||
plugin.getLogger().log(Level.FINER, "Logging player {0} in", player.getName());
|
||||
authPlugin.forceLogin(player);
|
||||
// Bukkit.getScheduler().runTaskLater(plugin, () -> {
|
||||
// if (player.isOnline()) {
|
||||
// plugin.getLogger().log(Level.FINER, "Logging player {0} in", player.getName());
|
||||
// authPlugin.forceLogin(player);
|
||||
// }
|
||||
Bukkit.getScheduler().runTaskLater(plugin, new Runnable() {
|
||||
|
||||
@Override
|
||||
public void run() {
|
||||
if (player.isOnline()) {
|
||||
plugin.getLogger().log(Level.FINE, "Logging player {0} in", player.getName());
|
||||
authPlugin.forceLogin(player);
|
||||
}
|
||||
}
|
||||
//Wait before auth plugin initializes the player
|
||||
}, 1 * 20L);
|
||||
|
@ -29,6 +29,7 @@ public class StartPacketListener extends PacketAdapter {
|
||||
|
||||
//only premium (paid account) users have a uuid from there
|
||||
private static final String UUID_LINK = "https://api.mojang.com/users/profiles/minecraft/";
|
||||
//this includes a-zA-Z1-9_
|
||||
private static final String VALID_PLAYERNAME = "^\\w{2,16}$";
|
||||
|
||||
private final ProtocolManager protocolManager;
|
||||
|
@ -23,6 +23,7 @@ commands:
|
||||
description: 'Marks the invoker or the player specified as premium'
|
||||
aliases: [prem, fastlogin, loginfast]
|
||||
usage: /<command> [player]
|
||||
permission: ${project.artifactId}.command.premium
|
||||
|
||||
permissions:
|
||||
${project.artifactId}.command.premium:
|
||||
|
Reference in New Issue
Block a user