File tree Expand file tree Collapse file tree 4 files changed +9
-1
lines changed
src/main/java/com/denizenscript/depenizen/bungee Expand file tree Collapse file tree 4 files changed +9
-1
lines changed Original file line number Diff line number Diff line change 2626 <dependency >
2727 <groupId >net.md-5</groupId >
2828 <artifactId >bungeecord-proxy</artifactId >
29- <version >1.15 -SNAPSHOT</version >
29+ <version >1.18 -SNAPSHOT</version >
3030 <scope >system</scope >
3131 <systemPath >${basedir} /lib/BungeeCord.jar</systemPath >
3232 </dependency >
Original file line number Diff line number Diff line change @@ -140,6 +140,7 @@ public void onPlayerJoin(PostLoginEvent event) {
140140 PlayerJoinPacketOut packet = new PlayerJoinPacketOut ();
141141 packet .name = event .getPlayer ().getName ();
142142 packet .uuid = event .getPlayer ().getUniqueId ();
143+ packet .ip = event .getPlayer ().getAddress ().toString ();
143144 broadcastPacket (packet );
144145 }
145146
@@ -148,6 +149,7 @@ public void onPlayerQuit(PlayerDisconnectEvent event) {
148149 PlayerQuitPacketOut packet = new PlayerQuitPacketOut ();
149150 packet .name = event .getPlayer ().getName ();
150151 packet .uuid = event .getPlayer ().getUniqueId ();
152+ packet .ip = event .getPlayer ().getAddress ().toString ();
151153 broadcastPacket (packet );
152154 }
153155
Original file line number Diff line number Diff line change @@ -11,6 +11,8 @@ public class PlayerJoinPacketOut extends PacketOut {
1111
1212 public UUID uuid ;
1313
14+ public String ip ;
15+
1416 @ Override
1517 public int getPacketId () {
1618 return 53 ;
@@ -21,5 +23,6 @@ public void writeTo(ByteBuf buf) {
2123 buf .writeLong (uuid .getMostSignificantBits ());
2224 buf .writeLong (uuid .getLeastSignificantBits ());
2325 writeString (buf , name );
26+ writeString (buf , ip );
2427 }
2528}
Original file line number Diff line number Diff line change @@ -11,6 +11,8 @@ public class PlayerQuitPacketOut extends PacketOut {
1111
1212 public UUID uuid ;
1313
14+ public String ip ;
15+
1416 @ Override
1517 public int getPacketId () {
1618 return 54 ;
@@ -21,5 +23,6 @@ public void writeTo(ByteBuf buf) {
2123 buf .writeLong (uuid .getMostSignificantBits ());
2224 buf .writeLong (uuid .getLeastSignificantBits ());
2325 writeString (buf , name );
26+ writeString (buf , ip );
2427 }
2528}
You can’t perform that action at this time.
0 commit comments