From 12db78eac40234a9fd5adc27a6a0558e5e1ccaf2 Mon Sep 17 00:00:00 2001 From: Richard Date: Sat, 31 Jul 2021 21:42:00 +0200 Subject: [PATCH] Fixed gradle error --- build.gradle | 1 - .../java/de/jpx3/ips/connect/bukkit/PacketReceiver.java | 8 ++++---- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/build.gradle b/build.gradle index 0e058d5..3fcb329 100644 --- a/build.gradle +++ b/build.gradle @@ -34,7 +34,6 @@ java { dependencies { compile 'net.md-5:bungeecord-api:1.16-R0.4' - compile 'net.md-5:bungeecord-proxy:1.15-SNAPSHOT' } publishing { diff --git a/src/main/java/de/jpx3/ips/connect/bukkit/PacketReceiver.java b/src/main/java/de/jpx3/ips/connect/bukkit/PacketReceiver.java index dfa1a71..3bf2098 100644 --- a/src/main/java/de/jpx3/ips/connect/bukkit/PacketReceiver.java +++ b/src/main/java/de/jpx3/ips/connect/bukkit/PacketReceiver.java @@ -5,8 +5,8 @@ import de.jpx3.ips.IntaveProxySupportPlugin; import de.jpx3.ips.connect.bukkit.exceptions.InvalidPacketException; import de.jpx3.ips.connect.bukkit.exceptions.ProtocolVersionMismatchException; -import net.md_5.bungee.UserConnection; import net.md_5.bungee.api.connection.Connection; +import net.md_5.bungee.api.connection.ProxiedPlayer; import net.md_5.bungee.api.event.PluginMessageEvent; import net.md_5.bungee.api.plugin.Listener; import net.md_5.bungee.event.EventHandler; @@ -40,14 +40,14 @@ public void onPluginMessageReceive(PluginMessageEvent event) { if (isUpstream(event.getSender())) { return; } - boolean isIntavePacket = receivePayloadPacket((UserConnection) event.getReceiver(), event.getData()); + boolean isIntavePacket = receivePayloadPacket((ProxiedPlayer) event.getReceiver(), event.getData()); if(isIntavePacket) { event.setCancelled(true); } } public boolean receivePayloadPacket( - UserConnection player, byte[] data + ProxiedPlayer player, byte[] data ) { ByteArrayDataInput inputData = newByteArrayDataInputFrom(data); try { @@ -132,7 +132,7 @@ private boolean isMarkedAsIntaveChannel(String channelTag) { } private boolean isUpstream(Connection connection) { - return connection instanceof UserConnection; + return connection instanceof ProxiedPlayer; } public static PacketReceiver createFrom(