Yatopia/patches/api/0003-EMC-add-Setter-for-player-name-in-AsyncPlayerPrelogi.patch
2020-02-26 20:12:29 +01:00

35 lines
1.3 KiB
Diff

From e86c4431ac5664fb84a97a138c3c6b0a73c1ed3f Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
Date: Wed, 28 Jan 2015 00:41:03 -0500
Subject: [PATCH] EMC add Setter for player name in AsyncPlayerPrelogin
This is so we can change the players name early in login process
---
.../java/org/bukkit/event/player/AsyncPlayerPreLoginEvent.java | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/main/java/org/bukkit/event/player/AsyncPlayerPreLoginEvent.java b/src/main/java/org/bukkit/event/player/AsyncPlayerPreLoginEvent.java
index 76c4a1a6..e482fa06 100644
--- a/src/main/java/org/bukkit/event/player/AsyncPlayerPreLoginEvent.java
+++ b/src/main/java/org/bukkit/event/player/AsyncPlayerPreLoginEvent.java
@@ -18,7 +18,7 @@ public class AsyncPlayerPreLoginEvent extends Event {
private static final HandlerList handlers = new HandlerList();
private Result result;
private String message;
- private final String name;
+ private String name; // EMC
private final InetAddress ipAddress;
private final UUID uniqueId;
@@ -169,6 +169,7 @@ public class AsyncPlayerPreLoginEvent extends Event {
public String getName() {
return name;
}
+ public void setName(String name) { this.name = name; } // EMC
/**
* Gets the player IP address.
--
2.25.1.windows.1