minecraft-src/net/minecraft/world/Nameable.java
2025-07-04 01:41:11 +03:00

21 lines
383 B
Java

package net.minecraft.world;
import net.minecraft.network.chat.Component;
import org.jetbrains.annotations.Nullable;
public interface Nameable {
Component getName();
default boolean hasCustomName() {
return this.getCustomName() != null;
}
default Component getDisplayName() {
return this.getName();
}
@Nullable
default Component getCustomName() {
return null;
}
}