9
0
mirror of https://github.com/HibiscusMC/HMCCosmetics.git synced 2025-12-30 04:19:28 +00:00

getUser by name

This commit is contained in:
LoJoSho
2022-12-09 10:34:45 -06:00
parent 8a384cee77
commit c44620fafc

View File

@@ -3,6 +3,7 @@ package com.hibiscusmc.hmccosmetics.user;
import com.google.common.collect.HashBiMap;
import com.hibiscusmc.hmccosmetics.util.ServerUtils;
import net.minecraft.world.entity.EntityType;
import org.bukkit.Bukkit;
import org.bukkit.entity.Entity;
import org.bukkit.entity.Player;
import org.jetbrains.annotations.Nullable;
@@ -43,4 +44,8 @@ public class CosmeticUsers {
if (entity.getType().equals(EntityType.PLAYER)) return null;
return COSMETIC_USERS.get(entity.getUniqueId());
}
public static CosmeticUser getUser(String playerName) {
return getUser(Bukkit.getPlayer(playerName).getUniqueId());
}
}