mirror of
https://github.com/libraryaddict/LibsDisguises.git
synced 2024-09-28 04:07:29 +02:00
Set custom name dynamically on start
This commit is contained in:
parent
01fa2ff843
commit
852d8c9f2b
@ -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 New Issue
Block a user