Merge branch 'main' into dependabot/maven/org.slf4j-slf4j-jdk14-2.0.7

This commit is contained in:
games647
2023-04-05 09:47:54 +02:00
committed by GitHub
6 changed files with 11 additions and 11 deletions

View File

@ -50,7 +50,7 @@ jobs:
languages: ${{ matrix.language }}
# Cache build process too like in the maven config
- uses: actions/cache@v3.2.6
- uses: actions/cache@v3.3.1
with:
path: ~/.m2/repository
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}

View File

@ -179,8 +179,8 @@ public class ProtocolLibListener extends PacketAdapter {
private boolean verifyNonce(Player sender, PacketContainer packet,
ClientPublicKey clientPublicKey, byte[] expectedToken) {
try {
if (MinecraftVersion.atOrAbove(new MinecraftVersion(1, 19, 0))
&& !MinecraftVersion.atOrAbove(new MinecraftVersion(1, 19, 3))) {
if (new MinecraftVersion(1, 19, 0).atOrAbove()
&& !(new MinecraftVersion(1, 19, 3).atOrAbove())) {
Either<byte[], ?> either = packet.getSpecificModifier(Either.class).read(0);
if (clientPublicKey == null) {
Optional<byte[]> left = either.left();
@ -224,7 +224,7 @@ public class ProtocolLibListener extends PacketAdapter {
PacketContainer packet = packetEvent.getPacket();
Optional<ClientPublicKey> clientKey = Optional.empty();
if (MinecraftVersion.atOrAbove(new MinecraftVersion(1, 19, 3))) {
if (new MinecraftVersion(1, 19, 3).atOrAbove()) {
// public key sent separate
clientKey = Optional.empty();
} else {

View File

@ -272,7 +272,7 @@ public class VerifyResponseTask implements Runnable {
//fake a new login packet in order to let the server handle all the other stuff
private void receiveFakeStartPacket(String username, ClientPublicKey clientKey) {
PacketContainer startPacket;
if (MinecraftVersion.atOrAbove(new MinecraftVersion(1, 19, 0))) {
if (new MinecraftVersion(1, 19, 0).atOrAbove()) {
startPacket = new PacketContainer(START);
startPacket.getStrings().write(0, username);

View File

@ -147,7 +147,7 @@
<dependency>
<groupId>com.github.games647</groupId>
<artifactId>craftapi</artifactId>
<version>0.6.1</version>
<version>0.6.2</version>
</dependency>
<!-- APIs we can use because they are available in all platforms (Spigot, Bungee, Velocity) -->

View File

@ -40,7 +40,6 @@ import com.github.games647.fastlogin.core.storage.MySQLStorage;
import com.github.games647.fastlogin.core.storage.SQLStorage;
import com.github.games647.fastlogin.core.storage.SQLiteStorage;
import com.google.common.base.Ticker;
import com.google.common.net.HostAndPort;
import com.zaxxer.hikari.HikariConfig;
import java.io.IOException;
@ -126,8 +125,8 @@ public class FastLoginCore<P extends C, C, T extends PlatformPlugin<C>> {
antiBot = createAntiBotService(config.getSection("anti-bot"));
Set<Proxy> proxies = config.getStringList("proxies")
.stream()
.map(HostAndPort::fromString)
.map(proxy -> new InetSocketAddress(proxy.getHostText(), proxy.getPort()))
.map(proxy -> proxy.split(":"))
.map(proxy -> new InetSocketAddress(proxy[0], Integer.parseInt(proxy[1])))
.map(sa -> new Proxy(Type.HTTP, sa))
.collect(toSet());
@ -269,6 +268,7 @@ public class FastLoginCore<P extends C, C, T extends PlatformPlugin<C>> {
return passwordGenerator;
}
@SuppressWarnings("unused")
public void setPasswordGenerator(PasswordGenerator<P> passwordGenerator) {
this.passwordGenerator = passwordGenerator;
}

View File

@ -202,8 +202,8 @@ mojang-request-limit: 600
# https://github.com/games647/FastLogin/issues/85
auto-register-unknown: false
# This disables the auto login from fastlogin. So a premium (like a paid account) authentication is requested, but
# the player won't be auto logged into the account.
# By setting this option to false, you can disable the auto login from fastlogin. So a premium (like a paid account)
# authentication is requested, but the player won't be auto logged into the account from the auth plugin.
#
# This can be used as 2Factor authentication for better security of your accounts. A hacker then needs both passwords.
# The password of your Minecraft and the password to login in with your auth plugin