org.bukkit.entity.Entity#getClass ( )源码实例Demo

下面列出了org.bukkit.entity.Entity#getClass ( ) 实例代码,或者点击链接到github查看源代码,也可以在右侧发表评论。

源代码1 项目: ProjectAres   文件: EntityInfo.java
public EntityInfo(Entity entity, @Nullable ParticipantState owner) {
    super(owner);
    this.entityType = entity.getType();
    this.entityClass = entity.getClass();
    this.customName = entity.getCustomName();
    this.nameKey = NMSHacks.getTranslationKey(entity);
}
 
源代码2 项目: ProjectAres   文件: MatchEntityState.java
public static @Nullable MatchEntityState get(Entity entity) {
    Match match = Matches.get(entity.getWorld());
    String customName = entity instanceof Player ? null : entity.getCustomName();
    return match == null ? null : new MatchEntityState(match, entity.getClass(), entity.getUniqueId(), entity.getEntityLocation(), customName);
}