mirror of
https://github.com/SunNetservers/MiniGames.git
synced 2024-12-05 00:43:15 +01: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 org.bukkit.Bukkit;
|
||||
import org.bukkit.OfflinePlayer;
|
||||
import org.bukkit.entity.Player;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
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>
|
||||
*/
|
||||
private String getPlayerName(@NotNull UUID playerId) {
|
||||
Player player = Bukkit.getPlayer(playerId);
|
||||
if (player != null) {
|
||||
return player.getName();
|
||||
} else {
|
||||
return playerId.toString();
|
||||
}
|
||||
return Bukkit.getOfflinePlayer(playerId).getName();
|
||||
}
|
||||
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user