Update 3.3.5
//Changes 3.3.5:// * Now Support our sponsor ipClean feature ( Get player real ip through their servers ) * Now Cache correctly Item Custom Names and Lores * Fix FlatToSQL converter * Add /authme getip <playername> command, perm : authme.admin.getip * Implement correctly XenForo Support * Fix maxregperip * Fix maxloginperip * Preparation for next features, coming soon !
This commit is contained in:
@@ -43,12 +43,7 @@ public class AsyncronousLogin {
|
||||
}
|
||||
|
||||
protected String getIP() {
|
||||
String ip = player.getAddress().getAddress().getHostAddress();
|
||||
if (Settings.bungee) {
|
||||
if (plugin.realIp.containsKey(name))
|
||||
ip = plugin.realIp.get(name);
|
||||
}
|
||||
return ip;
|
||||
return plugin.getIP(player);
|
||||
}
|
||||
protected boolean needsCaptcha() {
|
||||
if (Settings.useCaptcha) {
|
||||
@@ -100,7 +95,7 @@ public class AsyncronousLogin {
|
||||
return null;
|
||||
}
|
||||
if (Settings.getMaxLoginPerIp > 0 && !plugin.authmePermissible(player, "authme.allow2accounts") && !getIP().equalsIgnoreCase("127.0.0.1") && !getIP().equalsIgnoreCase("localhost")) {
|
||||
if (plugin.isLoggedIp(getIP())) {
|
||||
if (plugin.isLoggedIp(realName, getIP())) {
|
||||
m._(player, "logged_in");
|
||||
return null;
|
||||
}
|
||||
|
||||
@@ -68,7 +68,7 @@ public class ProcessSyncronousPlayerLogin implements Runnable {
|
||||
}
|
||||
}
|
||||
protected void teleportToSpawn() {
|
||||
Location spawnL = plugin.getSpawnLocation(player, player.getWorld());
|
||||
Location spawnL = plugin.getSpawnLocation(player);
|
||||
SpawnTeleportEvent tpEvent = new SpawnTeleportEvent(player, player.getLocation(), spawnL, true);
|
||||
pm.callEvent(tpEvent);
|
||||
if (!tpEvent.isCancelled()) {
|
||||
|
||||
@@ -15,6 +15,7 @@ import fr.xephi.authme.settings.Messages;
|
||||
import fr.xephi.authme.settings.Settings;
|
||||
|
||||
public class AsyncronousRegister {
|
||||
|
||||
protected Player player;
|
||||
protected String name;
|
||||
protected String password;
|
||||
@@ -37,13 +38,7 @@ public class AsyncronousRegister {
|
||||
}
|
||||
|
||||
protected String getIp() {
|
||||
String ip = player.getAddress().getAddress().getHostAddress();
|
||||
|
||||
if (Settings.bungee) {
|
||||
if (plugin.realIp.containsKey(name))
|
||||
ip = plugin.realIp.get(name);
|
||||
}
|
||||
return ip;
|
||||
return plugin.getIP(player);
|
||||
}
|
||||
|
||||
protected void preRegister() {
|
||||
|
||||
@@ -49,7 +49,7 @@ public class ProcessSyncronousEmailRegister implements Runnable {
|
||||
|
||||
if (Settings.isTeleportToSpawnEnabled) {
|
||||
World world = player.getWorld();
|
||||
Location loca = plugin.getSpawnLocation(player, world);
|
||||
Location loca = plugin.getSpawnLocation(player);
|
||||
RegisterTeleportEvent tpEvent = new RegisterTeleportEvent(player, loca);
|
||||
plugin.getServer().getPluginManager().callEvent(tpEvent);
|
||||
if(!tpEvent.isCancelled()) {
|
||||
@@ -65,7 +65,7 @@ public class ProcessSyncronousEmailRegister implements Runnable {
|
||||
}
|
||||
player.saveData();
|
||||
if (!Settings.noConsoleSpam)
|
||||
ConsoleLogger.info(player.getName() + " registered "+player.getAddress().getAddress().getHostAddress());
|
||||
ConsoleLogger.info(player.getName() + " registered "+plugin.getIP(player));
|
||||
if(plugin.notifications != null) {
|
||||
plugin.notifications.showNotification(new Notification("[AuthMe] " + player.getName() + " has registered by email!"));
|
||||
}
|
||||
|
||||
+3
-3
@@ -44,7 +44,7 @@ public class ProcessSyncronousPasswordRegister implements Runnable {
|
||||
|
||||
protected void forceLogin(Player player) {
|
||||
if (Settings.isTeleportToSpawnEnabled) {
|
||||
Location spawnLoc = plugin.getSpawnLocation(player, player.getWorld());
|
||||
Location spawnLoc = plugin.getSpawnLocation(player);
|
||||
AuthMeTeleportEvent tpEvent = new AuthMeTeleportEvent(player, spawnLoc);
|
||||
plugin.getServer().getPluginManager().callEvent(tpEvent);
|
||||
if(!tpEvent.isCancelled()) {
|
||||
@@ -81,7 +81,7 @@ public class ProcessSyncronousPasswordRegister implements Runnable {
|
||||
player.setGameMode(limbo.getGameMode());
|
||||
if (Settings.isTeleportToSpawnEnabled) {
|
||||
World world = player.getWorld();
|
||||
Location loca = plugin.getSpawnLocation(player, world);
|
||||
Location loca = plugin.getSpawnLocation(player);
|
||||
RegisterTeleportEvent tpEvent = new RegisterTeleportEvent(player, loca);
|
||||
plugin.getServer().getPluginManager().callEvent(tpEvent);
|
||||
if(!tpEvent.isCancelled()) {
|
||||
@@ -111,7 +111,7 @@ public class ProcessSyncronousPasswordRegister implements Runnable {
|
||||
player.saveData();
|
||||
|
||||
if (!Settings.noConsoleSpam)
|
||||
ConsoleLogger.info(player.getName() + " registered "+player.getAddress().getAddress().getHostAddress());
|
||||
ConsoleLogger.info(player.getName() + " registered "+plugin.getIP(player));
|
||||
if(plugin.notifications != null) {
|
||||
plugin.notifications.showNotification(new Notification("[AuthMe] " + player.getName() + " has registered!"));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user