Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
133cef037e |
No files matched your search
+2
-2
@@ -26,7 +26,7 @@ plugins {
|
||||
// --
|
||||
// Variables
|
||||
// --
|
||||
version = '2.6.1'
|
||||
version = '2.7.0'
|
||||
group = 'net.tcpshield.tcpshield'
|
||||
archivesBaseName = 'TCPShield'
|
||||
|
||||
@@ -95,7 +95,7 @@ repositories {
|
||||
dependencies {
|
||||
// Bukkit
|
||||
compileOnly group: 'org.spigotmc', name: 'spigot-api', version: '1.11-R0.1-SNAPSHOT'
|
||||
compileOnly group: 'com.comphenix.protocol', name: 'ProtocolLib', version: '5.0.0-SNAPSHOT'
|
||||
compileOnly group: 'com.comphenix.protocol', name: 'ProtocolLib', version: '5.1.0'
|
||||
|
||||
// Paper
|
||||
compileOnly group: 'com.destroystokyo.paper', name: 'paper-api', version: '1.15.2-R0.1-SNAPSHOT'
|
||||
|
||||
@@ -14,6 +14,7 @@ import net.tcpshield.tcpshield.util.validation.timestamp.TimestampValidator;
|
||||
import net.tcpshield.tcpshield.util.validation.timestamp.impl.HTPDateTimestampValidator;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.lang.reflect.InvocationTargetException;
|
||||
import java.net.InetAddress;
|
||||
import java.net.InetSocketAddress;
|
||||
import java.net.UnknownHostException;
|
||||
|
||||
@@ -31,7 +31,15 @@ public class VelocityPacket implements PacketProvider {
|
||||
Class<?> inboundConnection = Class.forName("com.velocitypowered.proxy.connection.client.InitialInboundConnection");
|
||||
|
||||
HANDSHAKE_FIELD = ReflectionUtil.getPrivateField(inboundConnection, "handshake");
|
||||
HOSTNAME_FIELD = ReflectionUtil.getPrivateField(Class.forName("com.velocitypowered.proxy.protocol.packet.Handshake"), "serverAddress");
|
||||
|
||||
Field hostnameField;
|
||||
try {
|
||||
hostnameField = ReflectionUtil.getPrivateField(Class.forName("com.velocitypowered.proxy.protocol.packet.HandshakePacket"), "serverAddress");
|
||||
} catch (Exception e) {
|
||||
hostnameField = ReflectionUtil.getPrivateField(Class.forName("com.velocitypowered.proxy.protocol.packet.Handshake"), "serverAddress");
|
||||
}
|
||||
HOSTNAME_FIELD = hostnameField;
|
||||
|
||||
CLEANED_ADDRESS_FIELD = ReflectionUtil.getPrivateField(inboundConnection, "cleanedAddress");
|
||||
} catch (Exception e) {
|
||||
throw new InitializationException(new ReflectionException(e));
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
name: TCPShield
|
||||
version: 2.6.1
|
||||
version: 2.7.0
|
||||
main: net.tcpshield.tcpshield.bungee.TCPShieldBungee
|
||||
author: https://tcpshield.com
|
||||
softdepends:
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
name: TCPShield
|
||||
version: 2.6.1
|
||||
version: 2.7.0
|
||||
main: net.tcpshield.tcpshield.bukkit.TCPShieldBukkit
|
||||
softdepend:
|
||||
- ProtocolLib
|
||||
|
||||
@@ -1 +1,16 @@
|
||||
{"id":"tcpshield","name":"TCPShield","version":"2.6.1","description":"TCPShield IP parsing capabilities for Velocity","authors":["TCPShield"],"dependencies":[{"id":"floodgate","optional":true}],"main":"net.tcpshield.tcpshield.velocity.TCPShieldVelocity"}
|
||||
{
|
||||
"id": "tcpshield",
|
||||
"name": "TCPShield",
|
||||
"version": "2.7.0",
|
||||
"description": "TCPShield IP parsing capabilities for Velocity",
|
||||
"authors": [
|
||||
"TCPShield"
|
||||
],
|
||||
"dependencies": [
|
||||
{
|
||||
"id": "floodgate",
|
||||
"optional": true
|
||||
}
|
||||
],
|
||||
"main": "net.tcpshield.tcpshield.velocity.TCPShieldVelocity"
|
||||
}
|
||||
Reference in new issue
Block a user