mirror of
https://github.com/YouHaveTrouble/Stand-in.git
synced 2026-05-11 22:16:55 +00:00
don't set empty name
This commit is contained in:
@@ -85,11 +85,12 @@ public class MannequinHandler extends EntityHandler<Mannequin> {
|
||||
if (!canUseAction(callbackPlayer, mann, EntityAction.EDIT)) return;
|
||||
if (mann.isDead()) return;
|
||||
String newName = view.getText("name");
|
||||
Component displayName = null;
|
||||
if (newName != null) {
|
||||
displayName = MiniMessage.miniMessage().deserialize(newName);
|
||||
}
|
||||
if (newName != null && !newName.isBlank()) {
|
||||
Component displayName = MiniMessage.miniMessage().deserialize(newName);
|
||||
mann.customName(displayName);
|
||||
} else {
|
||||
mann.customName(null);
|
||||
}
|
||||
mann.setImmovable(Boolean.TRUE.equals(view.getBoolean("immovable")));
|
||||
mann.setVelocity(mann.getVelocity().zero());
|
||||
mann.setGravity(Boolean.TRUE.equals(view.getBoolean("gravity")));
|
||||
|
||||
Reference in New Issue
Block a user