mirror of
https://github.com/TotalFreedomMC/TF-LibsDisguises.git
synced 2025-02-11 11:40:29 +00:00
Set custom name dynamically on start
This commit is contained in:
parent
01fa2ff843
commit
852d8c9f2b
1 changed files with 11 additions and 1 deletions
|
@ -413,7 +413,17 @@ public class PlayerDisguise extends TargetedDisguise {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (getName().equals("<Inherit>") && getEntity() != null) {
|
if (isDynamicName()) {
|
||||||
|
String name = getEntity().getCustomName();
|
||||||
|
|
||||||
|
if (name == null) {
|
||||||
|
name = "";
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!getName().equals(name)) {
|
||||||
|
setName(name);
|
||||||
|
}
|
||||||
|
} else if (getName().equals("<Inherit>") && getEntity() != null) {
|
||||||
String name = getEntity().getCustomName();
|
String name = getEntity().getCustomName();
|
||||||
|
|
||||||
if (name == null || name.isEmpty()) {
|
if (name == null || name.isEmpty()) {
|
||||||
|
|
Loading…
Reference in a new issue