Java Code Examples for org.bukkit.entity.Entity#getClass()
The following examples show how to use
org.bukkit.entity.Entity#getClass() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: EntityInfo.java From ProjectAres with GNU Affero General Public License v3.0 | 5 votes |
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); }
Example 2
Source File: MatchEntityState.java From ProjectAres with GNU Affero General Public License v3.0 | 4 votes |
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); }