mirror of
https://github.com/darksaid98/HuskHomes.git
synced 2026-12-03 22:16:34 +00:00
Use getPlayerExact(name) to prevent ambiguity on busy servers, Close #71
This commit is contained in:
1 parent
a3a62db800
commit
33fc3f4c32
1 file changed
+1
-1
@@ -175,7 +175,7 @@ public class TeleportManager {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public static void teleportHere(Player requester, String targetPlayerName, Connection connection) throws SQLException {
|
public static void teleportHere(Player requester, String targetPlayerName, Connection connection) throws SQLException {
|
||||||
Player targetPlayer = Bukkit.getPlayer(targetPlayerName);
|
Player targetPlayer = Bukkit.getPlayerExact(targetPlayerName);
|
||||||
if (targetPlayer != null) {
|
if (targetPlayer != null) {
|
||||||
if (targetPlayer.getUniqueId() != requester.getUniqueId()) {
|
if (targetPlayer.getUniqueId() != requester.getUniqueId()) {
|
||||||
teleportPlayer(targetPlayer, requester.getName(), connection);
|
teleportPlayer(targetPlayer, requester.getName(), connection);
|
||||||
|
|||||||
Reference in new issue
Block a user