wtf was that xD

This commit is contained in:
Gabriele C 2016-04-03 13:03:16 +02:00
parent c079692f1d
commit 88e517635c
4 changed files with 10 additions and 13 deletions

View File

@ -3,6 +3,7 @@ package fr.xephi.authme.listener;
import com.google.common.io.ByteArrayDataOutput;
import com.google.common.io.ByteStreams;
import fr.xephi.authme.AntiBot;
import fr.xephi.authme.AntiBot.AntiBotStatus;
import fr.xephi.authme.AuthMe;
import fr.xephi.authme.ConsoleLogger;
import fr.xephi.authme.cache.auth.PlayerAuth;
@ -330,16 +331,16 @@ public class AuthMePlayerListener implements Listener {
final String name = player.getName().toLowerCase();
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.antiBotInAction) {
event.setKickMessage(m.retrieveSingle(MessageKey.KICK_ANTIBOT));
event.setResult(PlayerLoginEvent.Result.KICK_OTHER);
return;
} else {
event.setKickMessage(m.retrieveSingle(MessageKey.MUST_REGISTER_MESSAGE));
event.setResult(PlayerLoginEvent.Result.KICK_OTHER);
return;
}
event.setKickMessage(m.retrieveSingle(MessageKey.MUST_REGISTER_MESSAGE));
event.setResult(PlayerLoginEvent.Result.KICK_OTHER);
return;
}
if (name.length() > Settings.getMaxNickLength || name.length() < Settings.getMinNickLength) {

View File

@ -27,7 +27,6 @@ import fr.xephi.authme.util.Utils.GroupType;
import org.bukkit.Location;
import org.bukkit.Material;
import org.bukkit.entity.Player;
import org.bukkit.inventory.PlayerInventory;
import org.bukkit.entity.LivingEntity;
import org.bukkit.potion.PotionEffect;
import org.bukkit.potion.PotionEffectType;

View File

@ -4,7 +4,6 @@ import fr.xephi.authme.settings.NewSetting;
import fr.xephi.authme.settings.properties.HooksSettings;
import fr.xephi.authme.settings.properties.RegistrationSettings;
import fr.xephi.authme.settings.properties.RestrictionSettings;
import fr.xephi.authme.settings.properties.PluginSettings;
import org.bukkit.Bukkit;
import org.bukkit.Location;
import org.bukkit.entity.LivingEntity;

View File

@ -25,8 +25,6 @@ public final class Settings {
public static final File PLUGIN_FOLDER = Wrapper.getInstance().getDataFolder();
public static final File MODULE_FOLDER = new File(PLUGIN_FOLDER, "modules");
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> getJoinPermissions;
public static List<String> getUnrestrictedName;