mirror of
https://github.com/tanyaofei/minecraft-fakeplayer.git
synced 2025-09-14 11:16:46 +08:00
Tell command sender if the name specified was online and dead
This commit is contained in:
parent
b9cf70ba1b
commit
3e5a21bd78
@ -146,18 +146,14 @@ public class NameManager {
|
||||
{
|
||||
var player = Bukkit.getPlayerExact(name);
|
||||
if (player != null) {
|
||||
if (player.isDead()) {
|
||||
throw new IllegalCustomNameException(translatable("fakeplayer.spawn.error.name.online-dead", text(name, GOLD), text("/fp respawn", DARK_GREEN)).color(RED));
|
||||
} else {
|
||||
throw new IllegalCustomNameException(translatable("fakeplayer.spawn.error.name.online", text(name, GOLD)).color(RED));
|
||||
}
|
||||
throw new IllegalCustomNameException(
|
||||
player.isDead()
|
||||
? translatable("fakeplayer.spawn.error.name.online-dead", text(name, GOLD), text("/fp respawn", DARK_GREEN)).color(RED)
|
||||
: translatable("fakeplayer.spawn.error.name.online", text(name, GOLD)).color(RED)
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
if (Bukkit.getPlayerExact(name) != null) {
|
||||
|
||||
}
|
||||
|
||||
var player = Bukkit.getOfflinePlayer(name);
|
||||
var uuid = player.getUniqueId();
|
||||
if (player.hasPlayedBefore() && !legacyUsedIdRepository.contains(uuid) && !profileRepository.existsByUUID(uuid)) {
|
||||
|
Loading…
Reference in New Issue
Block a user