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:
@@ -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());
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user