Package ch.njol.skript.entity
Class DroppedItemData
java.lang.Object
ch.njol.skript.entity.EntityData<org.bukkit.entity.Item>
ch.njol.skript.entity.DroppedItemData
- All Implemented Interfaces:
SyntaxElement
,YggdrasilSerializable
,YggdrasilSerializable.YggdrasilExtendedSerializable
-
Nested Class Summary
Nested classes/interfaces inherited from interface ch.njol.yggdrasil.YggdrasilSerializable
YggdrasilSerializable.YggdrasilExtendedSerializable, YggdrasilSerializable.YggdrasilRobustEnum, YggdrasilSerializable.YggdrasilRobustSerializable
-
Field Summary
Fields inherited from class ch.njol.skript.entity.EntityData
LANGUAGE_NODE, m_adult, m_age_pattern, m_baby, matchedPattern, serializer, WORLD_1_13_CONSUMER, WORLD_1_13_CONSUMER_METHOD, WORLD_1_17_CONSUMER, WORLD_1_17_CONSUMER_METHOD
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionboolean
canSpawn
(@Nullable org.bukkit.World world) Check if this entity type can spawn.protected boolean
Deprecated.protected boolean
equals_i
(EntityData<?> otherData) Returns the super type of this entity data, e.g.Class
<? extends org.bukkit.entity.Item> getType()
protected int
protected boolean
init
(Literal<?>[] expressions, int matchedPattern, SkriptParser.ParseResult parseResult) protected boolean
init
(@Nullable Class<? extends org.bukkit.entity.Item> clazz, @Nullable org.bukkit.entity.Item itemEntity) boolean
isSupertypeOf
(EntityData<?> otherData) protected boolean
match
(org.bukkit.entity.Item entity) void
set
(org.bukkit.entity.Item entity) @Nullable org.bukkit.entity.Item
Spawn this entity data at a location.toString
(int flags) Methods inherited from class ch.njol.skript.entity.EntityData
deserialize, equals, fromClass, fromEntity, getAgeAdjective, getAll, getAll, getAll, getInfo, getInfo, getName, hashCode, init, isBaby, isInstance, isPlural, onRegistrationStop, parse, parseWithoutIndefiniteArticle, register, register, serialize, spawn, spawn, spawn, toString, toString, toString, toString, toString
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface ch.njol.skript.lang.SyntaxElement
getParser
-
Constructor Details
-
DroppedItemData
public DroppedItemData() -
DroppedItemData
-
-
Method Details
-
init
protected boolean init(Literal<?>[] expressions, int matchedPattern, SkriptParser.ParseResult parseResult) - Specified by:
init
in classEntityData<org.bukkit.entity.Item>
-
init
protected boolean init(@Nullable @Nullable Class<? extends org.bukkit.entity.Item> clazz, @Nullable @Nullable org.bukkit.entity.Item itemEntity) - Specified by:
init
in classEntityData<org.bukkit.entity.Item>
- Parameters:
clazz
- An entity's class, e.g. PlayeritemEntity
- An actual entity, or null to get an entity data for an entity class- Returns:
- Whether initialisation was successful
-
match
protected boolean match(org.bukkit.entity.Item entity) - Specified by:
match
in classEntityData<org.bukkit.entity.Item>
-
set
public void set(org.bukkit.entity.Item entity) - Specified by:
set
in classEntityData<org.bukkit.entity.Item>
-
isSupertypeOf
- Specified by:
isSupertypeOf
in classEntityData<org.bukkit.entity.Item>
-
getType
- Specified by:
getType
in classEntityData<org.bukkit.entity.Item>
-
getSuperType
Description copied from class:EntityData
Returns the super type of this entity data, e.g. 'wolf' for 'angry wolf'.- Specified by:
getSuperType
in classEntityData<org.bukkit.entity.Item>
- Returns:
- The supertype of this entity data. Must not be null.
-
toString
- Overrides:
toString
in classEntityData<org.bukkit.entity.Item>
-
deserialize
Deprecated.- Overrides:
deserialize
in classEntityData<org.bukkit.entity.Item>
-
equals_i
- Specified by:
equals_i
in classEntityData<org.bukkit.entity.Item>
-
canSpawn
public boolean canSpawn(@Nullable @Nullable org.bukkit.World world) Description copied from class:EntityData
Check if this entity type can spawn.Some entity types may be restricted by experimental datapacks.
- Overrides:
canSpawn
in classEntityData<org.bukkit.entity.Item>
- Parameters:
world
- World to check if entity can spawn in- Returns:
- True if entity can spawn else false
-
spawn
@Nullable public @Nullable org.bukkit.entity.Item spawn(org.bukkit.Location location, @Nullable @Nullable Consumer<org.bukkit.entity.Item> consumer) Description copied from class:EntityData
Spawn this entity data at a location. The consumer allows for modification to the entity before it actually gets spawned.- Overrides:
spawn
in classEntityData<org.bukkit.entity.Item>
- Parameters:
location
- TheLocation
to spawn the entity at.consumer
- AConsumer
to apply the entity changes to.- Returns:
- The Entity object that is spawned.
-
hashCode_i
protected int hashCode_i()- Specified by:
hashCode_i
in classEntityData<org.bukkit.entity.Item>
-