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

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