From 6fd3486dabe2bd6c9ef7005770ccb2232480bedb Mon Sep 17 00:00:00 2001 From: md_5 Date: Tue, 14 May 2013 21:14:43 +1000 Subject: [PATCH] Add IP for players raw IP address --- Bukkit-Patches/0007-BungeeCord-Support.patch | 27 +++++++++++++++++++ .../0031-BungeeCord-Support.patch | 17 +++++++++++- 2 files changed, 43 insertions(+), 1 deletion(-) create mode 100644 Bukkit-Patches/0007-BungeeCord-Support.patch diff --git a/Bukkit-Patches/0007-BungeeCord-Support.patch b/Bukkit-Patches/0007-BungeeCord-Support.patch new file mode 100644 index 0000000000..d4d35f7257 --- /dev/null +++ b/Bukkit-Patches/0007-BungeeCord-Support.patch @@ -0,0 +1,27 @@ +From aec07f66117cb86522e8f507bbd6e53780eb1e36 Mon Sep 17 00:00:00 2001 +From: md_5 +Date: Tue, 14 May 2013 21:11:29 +1000 +Subject: [PATCH] BungeeCord Support + + +diff --git a/src/main/java/org/bukkit/entity/Player.java b/src/main/java/org/bukkit/entity/Player.java +index dec2214..602ecef 100644 +--- a/src/main/java/org/bukkit/entity/Player.java ++++ b/src/main/java/org/bukkit/entity/Player.java +@@ -646,4 +646,13 @@ public interface Player extends HumanEntity, Conversable, CommandSender, Offline + * yet or has logged out + */ + public void setScoreboard(Scoreboard scoreboard) throws IllegalArgumentException, IllegalStateException; ++ ++ // Spigot start ++ /** ++ * Gets the connection address of this player, regardless of whether it has been spoofed or not. ++ * ++ * @return the player's connection address ++ */ ++ public InetSocketAddress getRawAddress(); ++ // Spigot end + } +-- +1.8.2.1 + diff --git a/CraftBukkit-Patches/0031-BungeeCord-Support.patch b/CraftBukkit-Patches/0031-BungeeCord-Support.patch index 02f50b122c..dbbfcec91f 100644 --- a/CraftBukkit-Patches/0031-BungeeCord-Support.patch +++ b/CraftBukkit-Patches/0031-BungeeCord-Support.patch @@ -1,4 +1,4 @@ -From 27f6ceb7a4ed65d7d04d6be7efce9cbbf5188a65 Mon Sep 17 00:00:00 2001 +From ee5ca0a66101f023785a213a33eacb5be00b114f Mon Sep 17 00:00:00 2001 From: md_5 Date: Sat, 23 Mar 2013 11:15:11 +1100 Subject: [PATCH] BungeeCord Support @@ -78,6 +78,21 @@ index f25852e..b327310 100644 if (metrics == null) { try { +diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +index 0b5ea21..fa9b9f1 100644 +--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java ++++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +@@ -1012,4 +1012,10 @@ public class CraftPlayer extends CraftHumanEntity implements Player { + + this.server.getScoreboardManager().setPlayerBoard(this, scoreboard); + } ++ ++ // Spigot start ++ public InetSocketAddress getRawAddress() { ++ return (InetSocketAddress) this.getHandle().playerConnection.networkManager.getSocket().getRemoteSocketAddress(); ++ } ++ // Spigot end + } diff --git a/src/main/resources/configurations/bukkit.yml b/src/main/resources/configurations/bukkit.yml index eb23dae..62bf79a 100644 --- a/src/main/resources/configurations/bukkit.yml