Interface BlockEntityNameable

All Known Implementing Classes:
BlockEntityBarrel, BlockEntityBlastFurnace, BlockEntityBrewingStand, BlockEntityChest, BlockEntityCommandBlock, BlockEntityDispenser, BlockEntityDropper, BlockEntityEjectable, BlockEntityEnchantTable, BlockEntityFurnace, BlockEntityHopper, BlockEntityShulkerBox, BlockEntitySmoker

public interface BlockEntityNameable
表达一个能被命名的事物的接口。
An interface describes an object that can be named.
Since:
Nukkit 1.0 | Nukkit API 1.0.0
Author:
MagicDroidX(code) @ Nukkit Project, 粉鞋大妈(javadoc) @ Nukkit Project
  • Method Summary

    Modifier and Type
    Method
    Description
    返回这个事物的名字。
    Gets the name of this object.
    boolean
    返回这个事物是否有名字。
    Whether this object has a name.
    void
    设置或更改这个事物的名字。
    Changes the name of this object, or names it.
  • Method Details

    • getName

      String getName()
      返回这个事物的名字。
      Gets the name of this object.
      Returns:
      这个事物的名字。
      The name of this object.
      Since:
      Nukkit 1.0 | Nukkit API 1.0.0
    • setName

      void setName(String name)
      设置或更改这个事物的名字。
      Changes the name of this object, or names it.
      Parameters:
      name - 这个事物的新名字。
      The new name of this object.
      Since:
      Nukkit 1.0 | Nukkit API 1.0.0
    • hasName

      boolean hasName()
      返回这个事物是否有名字。
      Whether this object has a name.
      Returns:
      如果有名字,返回 true
      true for this object has a name.
      Since:
      Nukkit 1.0 | Nukkit API 1.0.0