Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
bb7511d37f | ||
|
|
78666de764 | ||
|
|
0534b8eae8 |
No files matched your search
+1
-1
@@ -26,7 +26,7 @@ plugins {
|
||||
// --
|
||||
// Variables
|
||||
// --
|
||||
version = '2.6.0'
|
||||
version = '2.6.1'
|
||||
group = 'net.tcpshield.tcpshield'
|
||||
archivesBaseName = 'TCPShield'
|
||||
|
||||
|
||||
@@ -57,7 +57,7 @@ public class PaperPlayer implements PlayerProvider {
|
||||
@Override
|
||||
public void disconnect() {
|
||||
handshakeEvent.setCancelled(false); // Caused issues with newer versions of Paper (Thanks https://github.com/realDragonium)
|
||||
handshakeEvent.setFailMessage("Connection failed. Please try again or contract an administrator.");
|
||||
handshakeEvent.setFailMessage("Connection failed. Please try again or contact an administrator.");
|
||||
handshakeEvent.setFailed(true);
|
||||
}
|
||||
|
||||
|
||||
@@ -16,6 +16,17 @@ public class VelocityHandshakeHandler {
|
||||
|
||||
private final TCPShieldPlugin plugin;
|
||||
|
||||
|
||||
private static Class<?> CONNECTED_PLAYER_CONNECTION_CLASS;
|
||||
|
||||
static {
|
||||
try {
|
||||
CONNECTED_PLAYER_CONNECTION_CLASS = Class.forName("com.velocitypowered.proxy.connection.client.ConnectedPlayer");
|
||||
} catch (Exception e) {
|
||||
// ignore for old velocity versions
|
||||
}
|
||||
}
|
||||
|
||||
public VelocityHandshakeHandler(TCPShieldPlugin plugin) {
|
||||
this.plugin = plugin;
|
||||
}
|
||||
@@ -42,6 +53,12 @@ public class VelocityHandshakeHandler {
|
||||
@Subscribe(order = PostOrder.FIRST)
|
||||
public void onProxyPing(ProxyPingEvent e) {
|
||||
InboundConnection connection = e.getConnection();
|
||||
|
||||
if (connection.getClass() == CONNECTED_PLAYER_CONNECTION_CLASS) {
|
||||
// new ServerData (0x42) packet on connect, we don't care about it
|
||||
return;
|
||||
}
|
||||
|
||||
handleEvent(connection, "onProxyPing");
|
||||
}
|
||||
|
||||
|
||||
@@ -4,7 +4,6 @@ import com.velocitypowered.api.proxy.InboundConnection;
|
||||
import net.tcpshield.tcpshield.provider.PlayerProvider;
|
||||
import net.tcpshield.tcpshield.util.ReflectionUtil;
|
||||
import net.tcpshield.tcpshield.util.exception.manipulate.PlayerManipulationException;
|
||||
import net.tcpshield.tcpshield.util.exception.phase.HandshakeException;
|
||||
import net.tcpshield.tcpshield.util.exception.phase.InitializationException;
|
||||
import net.tcpshield.tcpshield.util.exception.phase.ReflectionException;
|
||||
|
||||
@@ -27,6 +26,7 @@ public class VelocityPlayer implements PlayerProvider {
|
||||
private static final Method CLOSE_CHANNEL_METHOD;
|
||||
|
||||
// new velocity support
|
||||
|
||||
private static Class<?> LOGIN_INBOUND_CONNECTION_CLASS;
|
||||
private static Field LOGIN_INBOUND_CONNECTION_DELEGATE_FIELD;
|
||||
|
||||
@@ -149,7 +149,7 @@ public class VelocityPlayer implements PlayerProvider {
|
||||
}
|
||||
|
||||
enum ConnectionType {
|
||||
LOGIN_INBOUND, INITIAL_INBOUND, LEGACY;
|
||||
LOGIN_INBOUND, INITIAL_INBOUND, LEGACY
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,5 +1,5 @@
|
||||
name: TCPShield
|
||||
version: 2.6.0
|
||||
version: 2.6.1
|
||||
main: net.tcpshield.tcpshield.bungee.TCPShieldBungee
|
||||
author: https://tcpshield.com
|
||||
softdepends:
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
name: TCPShield
|
||||
version: 2.6.0
|
||||
version: 2.6.1
|
||||
main: net.tcpshield.tcpshield.bukkit.TCPShieldBukkit
|
||||
softdepend:
|
||||
- ProtocolLib
|
||||
|
||||
@@ -1,16 +1 @@
|
||||
{
|
||||
"id": "tcpshield",
|
||||
"name": "TCPShield",
|
||||
"version": "2.6.0",
|
||||
"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.6.1","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