Class XEntity
java.lang.Object
com.cryptomorin.xseries.XEntity
XEntity - YAML Entity Serializer
Supports 1.9+ Using ConfigurationSection Example:
Supports 1.9+ Using ConfigurationSection Example:
ConfigurationSection section = plugin.getConfig().getConfigurationSection("champions.king");
Entity entity = XEntity.spawn(loc, section);
Entity: https://hub.spigotmc.org/javadocs/spigot/org/bukkit/entity/Entity.html- Version:
- 4.1.0
- Author:
- Crypto Morin
- See Also:
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionstatic @NotNull org.bukkit.entity.Entityedit(@NotNull org.bukkit.entity.Entity entity, @NotNull org.bukkit.configuration.ConfigurationSection config) static voideditBossBar(org.bukkit.boss.BossBar bossBar, org.bukkit.configuration.ConfigurationSection section) Edits an existing BossBar from the config.static booleanisUndead(@Nullable org.bukkit.entity.EntityType type) Checks if an entity is an undead.static <T extends org.bukkit.entity.Entity>
Tspawn(@NotNull org.bukkit.Location location, @NotNull Class<T> clazz, boolean randomizeData, @Nullable Consumer<? super T> function) static <T extends org.bukkit.entity.LivingEntity>
Tspawn(@NotNull org.bukkit.Location location, @NotNull Class<T> clazz, org.bukkit.event.entity.CreatureSpawnEvent.SpawnReason spawnReason, boolean randomizeData, @Nullable Consumer<? super T> function) static @Nullable org.bukkit.entity.Entityspawn(@NotNull org.bukkit.Location location, @NotNull org.bukkit.configuration.ConfigurationSection config)
-
Field Details
-
UNDEAD
-
-
Method Details
-
isUndead
public static boolean isUndead(@Nullable @Nullable org.bukkit.entity.EntityType type) Checks if an entity is an undead.- Parameters:
type- the entity type.- Returns:
- true if the entity is an undead.
- Since:
- 2.0.0
-
spawn
@Nullable public static @Nullable org.bukkit.entity.Entity spawn(@NotNull @NotNull org.bukkit.Location location, @NotNull @NotNull org.bukkit.configuration.ConfigurationSection config) -
spawn
-
spawn
@NotNull public static <T extends org.bukkit.entity.LivingEntity> T spawn(@NotNull @NotNull org.bukkit.Location location, @NotNull @NotNull Class<T> clazz, @NotNull org.bukkit.event.entity.CreatureSpawnEvent.SpawnReason spawnReason, boolean randomizeData, @Nullable @Nullable Consumer<? super T> function) -
edit
@NotNull public static @NotNull org.bukkit.entity.Entity edit(@NotNull @NotNull org.bukkit.entity.Entity entity, @NotNull @NotNull org.bukkit.configuration.ConfigurationSection config) -
editBossBar
public static void editBossBar(org.bukkit.boss.BossBar bossBar, org.bukkit.configuration.ConfigurationSection section) Edits an existing BossBar from the config.- Parameters:
bossBar- the created bossbar.section- the config section to edit the bossbar from.- Since:
- 3.0.0
-