Add getRawAddress back

This commit is contained in:
md_5 2014-01-17 09:46:50 +11:00
parent 90779a43f9
commit 49ae0093db

View File

@ -1,4 +1,4 @@
From cdb861b8b7bd28a5d8b649917a86fa4cbd0cccd9 Mon Sep 17 00:00:00 2001
From c0438ee1849ff6e595d6c7f833527dc8226b3b95 Mon Sep 17 00:00:00 2001
From: md_5 <md_5@live.com.au>
Date: Sun, 1 Dec 2013 18:18:41 +1100
Subject: [PATCH] BungeeCord Support
@ -56,7 +56,7 @@ index 6beac82..aa06e92 100644
// CraftBukkit start
diff --git a/src/main/java/net/minecraft/server/NetworkManager.java b/src/main/java/net/minecraft/server/NetworkManager.java
index 8f829bb..4907a62 100644
index 8f829bb..6b2fbb9 100644
--- a/src/main/java/net/minecraft/server/NetworkManager.java
+++ b/src/main/java/net/minecraft/server/NetworkManager.java
@@ -34,7 +34,8 @@ public class NetworkManager extends SimpleChannelInboundHandler {
@ -69,6 +69,35 @@ index 8f829bb..4907a62 100644
private PacketListener m;
private EnumProtocol n;
private IChatBaseComponent o;
@@ -195,4 +196,11 @@ public class NetworkManager extends SimpleChannelInboundHandler {
static Channel a(NetworkManager networkmanager) {
return networkmanager.k;
}
+
+ // Spigot Start
+ public SocketAddress getRawAddress()
+ {
+ return this.k.remoteAddress();
+ }
+ // Spigot End
}
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
index 52c75f0..23b4112 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
@@ -1135,6 +1135,12 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
{
@Override
+ public InetSocketAddress getRawAddress()
+ {
+ return (InetSocketAddress) getHandle().playerConnection.networkManager.getRawAddress();
+ }
+
+ @Override
public boolean getCollidesWithEntities()
{
return getHandle().collidesWithEntities;
diff --git a/src/main/java/org/spigotmc/SpigotConfig.java b/src/main/java/org/spigotmc/SpigotConfig.java
index 6e32691..acd5567 100644
--- a/src/main/java/org/spigotmc/SpigotConfig.java