Compile the project with Java 7. Many hosters don't have Java 8 yet.

This commit is contained in:
games647
2015-09-16 16:12:33 +02:00
parent eb394b5f60
commit cb129547f5
6 changed files with 22 additions and 10 deletions

View File

@ -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-->

View File

@ -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 {

View File

@ -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 {

View File

@ -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);

View File

@ -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;

View File

@ -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: