wtf was that xD
This commit is contained in:
parent
c079692f1d
commit
88e517635c
@ -3,6 +3,7 @@ package fr.xephi.authme.listener;
|
|||||||
import com.google.common.io.ByteArrayDataOutput;
|
import com.google.common.io.ByteArrayDataOutput;
|
||||||
import com.google.common.io.ByteStreams;
|
import com.google.common.io.ByteStreams;
|
||||||
import fr.xephi.authme.AntiBot;
|
import fr.xephi.authme.AntiBot;
|
||||||
|
import fr.xephi.authme.AntiBot.AntiBotStatus;
|
||||||
import fr.xephi.authme.AuthMe;
|
import fr.xephi.authme.AuthMe;
|
||||||
import fr.xephi.authme.ConsoleLogger;
|
import fr.xephi.authme.ConsoleLogger;
|
||||||
import fr.xephi.authme.cache.auth.PlayerAuth;
|
import fr.xephi.authme.cache.auth.PlayerAuth;
|
||||||
@ -330,16 +331,16 @@ public class AuthMePlayerListener implements Listener {
|
|||||||
final String name = player.getName().toLowerCase();
|
final String name = player.getName().toLowerCase();
|
||||||
boolean isAuthAvailable = dataSource.isAuthAvailable(name);
|
boolean isAuthAvailable = dataSource.isAuthAvailable(name);
|
||||||
|
|
||||||
|
if (antiBot.getAntiBotStatus()==AntiBotStatus.ACTIVE && !isAuthAvailable) {
|
||||||
|
event.setKickMessage(m.retrieveSingle(MessageKey.KICK_ANTIBOT));
|
||||||
|
event.setResult(PlayerLoginEvent.Result.KICK_OTHER);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
if (Settings.isKickNonRegisteredEnabled && !isAuthAvailable) {
|
if (Settings.isKickNonRegisteredEnabled && !isAuthAvailable) {
|
||||||
if (Settings.antiBotInAction) {
|
event.setKickMessage(m.retrieveSingle(MessageKey.MUST_REGISTER_MESSAGE));
|
||||||
event.setKickMessage(m.retrieveSingle(MessageKey.KICK_ANTIBOT));
|
event.setResult(PlayerLoginEvent.Result.KICK_OTHER);
|
||||||
event.setResult(PlayerLoginEvent.Result.KICK_OTHER);
|
return;
|
||||||
return;
|
|
||||||
} else {
|
|
||||||
event.setKickMessage(m.retrieveSingle(MessageKey.MUST_REGISTER_MESSAGE));
|
|
||||||
event.setResult(PlayerLoginEvent.Result.KICK_OTHER);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (name.length() > Settings.getMaxNickLength || name.length() < Settings.getMinNickLength) {
|
if (name.length() > Settings.getMaxNickLength || name.length() < Settings.getMinNickLength) {
|
||||||
|
|||||||
@ -27,7 +27,6 @@ import fr.xephi.authme.util.Utils.GroupType;
|
|||||||
import org.bukkit.Location;
|
import org.bukkit.Location;
|
||||||
import org.bukkit.Material;
|
import org.bukkit.Material;
|
||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
import org.bukkit.inventory.PlayerInventory;
|
|
||||||
import org.bukkit.entity.LivingEntity;
|
import org.bukkit.entity.LivingEntity;
|
||||||
import org.bukkit.potion.PotionEffect;
|
import org.bukkit.potion.PotionEffect;
|
||||||
import org.bukkit.potion.PotionEffectType;
|
import org.bukkit.potion.PotionEffectType;
|
||||||
|
|||||||
@ -4,7 +4,6 @@ import fr.xephi.authme.settings.NewSetting;
|
|||||||
import fr.xephi.authme.settings.properties.HooksSettings;
|
import fr.xephi.authme.settings.properties.HooksSettings;
|
||||||
import fr.xephi.authme.settings.properties.RegistrationSettings;
|
import fr.xephi.authme.settings.properties.RegistrationSettings;
|
||||||
import fr.xephi.authme.settings.properties.RestrictionSettings;
|
import fr.xephi.authme.settings.properties.RestrictionSettings;
|
||||||
import fr.xephi.authme.settings.properties.PluginSettings;
|
|
||||||
import org.bukkit.Bukkit;
|
import org.bukkit.Bukkit;
|
||||||
import org.bukkit.Location;
|
import org.bukkit.Location;
|
||||||
import org.bukkit.entity.LivingEntity;
|
import org.bukkit.entity.LivingEntity;
|
||||||
|
|||||||
@ -25,8 +25,6 @@ public final class Settings {
|
|||||||
public static final File PLUGIN_FOLDER = Wrapper.getInstance().getDataFolder();
|
public static final File PLUGIN_FOLDER = Wrapper.getInstance().getDataFolder();
|
||||||
public static final File MODULE_FOLDER = new File(PLUGIN_FOLDER, "modules");
|
public static final File MODULE_FOLDER = new File(PLUGIN_FOLDER, "modules");
|
||||||
public static final File CACHE_FOLDER = new File(PLUGIN_FOLDER, "cache");
|
public static final File CACHE_FOLDER = new File(PLUGIN_FOLDER, "cache");
|
||||||
// This is not an option!
|
|
||||||
public static boolean antiBotInAction = false;
|
|
||||||
public static List<String> allowCommands;
|
public static List<String> allowCommands;
|
||||||
public static List<String> getJoinPermissions;
|
public static List<String> getJoinPermissions;
|
||||||
public static List<String> getUnrestrictedName;
|
public static List<String> getUnrestrictedName;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user