2022-03-01 06:43:03 +01:00
|
|
|
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
|
|
From: MCMDEV <john-m.1@gmx.de>
|
|
|
|
Date: Fri, 24 Sep 2021 17:59:21 +0200
|
|
|
|
Subject: [PATCH] Added getHostname to AsyncPlayerPreLoginEvent
|
|
|
|
|
|
|
|
|
|
|
|
diff --git a/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java
|
2023-09-23 00:33:14 +02:00
|
|
|
index 52f1fcbe104e75e4413e90e77bfc0a93294dd1c6..f7ad9f51d4fb45d41c718a97c1fad72504d0c0ad 100644
|
2022-03-01 06:43:03 +01:00
|
|
|
--- a/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java
|
|
|
|
+++ b/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java
|
2023-09-22 17:08:04 +02:00
|
|
|
@@ -326,7 +326,7 @@ public class ServerLoginPacketListenerImpl implements ServerLoginPacketListener,
|
2022-03-01 06:43:03 +01:00
|
|
|
|
|
|
|
// Paper start
|
2023-09-22 17:08:04 +02:00
|
|
|
com.destroystokyo.paper.profile.PlayerProfile profile = com.destroystokyo.paper.profile.CraftPlayerProfile.asBukkitMirror(gameprofile);
|
2022-03-01 06:43:03 +01:00
|
|
|
- AsyncPlayerPreLoginEvent asyncEvent = new AsyncPlayerPreLoginEvent(playerName, address, rawAddress, uniqueId, profile); // Paper - add rawAddress
|
2022-10-31 03:44:25 +01:00
|
|
|
+ AsyncPlayerPreLoginEvent asyncEvent = new AsyncPlayerPreLoginEvent(playerName, address, rawAddress, uniqueId, profile, ServerLoginPacketListenerImpl.this.connection.hostname); // Paper - add rawAddress & hostname
|
2022-03-01 06:43:03 +01:00
|
|
|
server.getPluginManager().callEvent(asyncEvent);
|
|
|
|
profile = asyncEvent.getPlayerProfile();
|
|
|
|
profile.complete(true); // Paper - setPlayerProfileAPI
|