Mirror von
https://github.com/PaperMC/Paper.git
synchronisiert 2024-12-18 12:30:06 +01:00
SPIGOT-4022: Improve utility of Entity.getName for non-players
Dieser Commit ist enthalten in:
Ursprung
f03c10c185
Commit
fa1340f7a6
@ -568,7 +568,7 @@ public abstract class CraftEntity implements org.bukkit.entity.Entity {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String getName() {
|
public String getName() {
|
||||||
return getHandle().getName();
|
return CraftChatMessage.fromComponent(getHandle().getDisplayName(), EnumChatFormat.WHITE);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -92,6 +92,11 @@ public class CraftHumanEntity extends CraftLivingEntity implements HumanEntity {
|
|||||||
return getHandle().sleepTicks;
|
return getHandle().sleepTicks;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String getName() {
|
||||||
|
return getHandle().getName();
|
||||||
|
}
|
||||||
|
|
||||||
public boolean isOp() {
|
public boolean isOp() {
|
||||||
return op;
|
return op;
|
||||||
}
|
}
|
||||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren