mirror of
https://github.com/SunNetservers/MiniGames.git
synced 2025-04-03 10:16:26 +02:00
Fixes displaying player names in placeholders
This commit is contained in:
parent
efaca03434
commit
458dbc2beb
@ -14,7 +14,6 @@ import net.knarcraft.dropper.property.ArenaGameMode;
|
|||||||
import net.knarcraft.dropper.util.DropperGroupRecordHelper;
|
import net.knarcraft.dropper.util.DropperGroupRecordHelper;
|
||||||
import org.bukkit.Bukkit;
|
import org.bukkit.Bukkit;
|
||||||
import org.bukkit.OfflinePlayer;
|
import org.bukkit.OfflinePlayer;
|
||||||
import org.bukkit.entity.Player;
|
|
||||||
import org.jetbrains.annotations.NotNull;
|
import org.jetbrains.annotations.NotNull;
|
||||||
import org.jetbrains.annotations.Nullable;
|
import org.jetbrains.annotations.Nullable;
|
||||||
|
|
||||||
@ -233,12 +232,7 @@ public class DropperRecordExpansion extends PlaceholderExpansion {
|
|||||||
* @return <p>The name of the player, or a string representation of the UUID if not found</p>
|
* @return <p>The name of the player, or a string representation of the UUID if not found</p>
|
||||||
*/
|
*/
|
||||||
private String getPlayerName(@NotNull UUID playerId) {
|
private String getPlayerName(@NotNull UUID playerId) {
|
||||||
Player player = Bukkit.getPlayer(playerId);
|
return Bukkit.getOfflinePlayer(playerId).getName();
|
||||||
if (player != null) {
|
|
||||||
return player.getName();
|
|
||||||
} else {
|
|
||||||
return playerId.toString();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user