Class TargetTargeter
java.lang.Object
me.deecaad.core.mechanics.targeters.Targeter
me.deecaad.core.mechanics.targeters.TargetTargeter
- All Implemented Interfaces:
InlineSerializer<Targeter>,Serializer<Targeter>,net.kyori.adventure.key.Keyed,org.bukkit.Keyed
-
Nested Class Summary
Nested classes/interfaces inherited from interface me.deecaad.core.file.InlineSerializer
InlineSerializer.FormatException -
Field Summary
Fields inherited from interface me.deecaad.core.file.InlineSerializer
NAME_FINDER, UNIQUE_IDENTIFIER -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription@NotNull org.bukkit.NamespacedKeygetKey()getTargets0(CastData cast) @Nullable StringReturns a link to the page on the wiki that describes this serializer.booleanisEntity()Returnstrueif this targeter specifically targets an entity.@NotNull Targeterserialize(@NotNull me.deecaad.core.file.SerializeData data) Instantiates a new Object to be added into the finalized configuration.Methods inherited from class me.deecaad.core.mechanics.targeters.Targeter
applyParentArgs, getOffset, getTargets, isEyeMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface me.deecaad.core.file.InlineSerializer
getInlineKeyword, getKeyword, shouldSerializeMethods inherited from interface org.bukkit.Keyed
keyMethods inherited from interface me.deecaad.core.file.Serializer
canUsePathTo, getName, getParentKeywords, letPassThrough, tryPathTo, useLater
-
Constructor Details
-
TargetTargeter
public TargetTargeter()Default constructor for serializer.
-
-
Method Details
-
isEntity
public boolean isEntity()Description copied from class:TargeterReturnstrueif this targeter specifically targets an entity. Entity targeters also target locations by default, but that location will always be the entity's location.There is 1 caveat, when
Targeter.getOffset()is non-null, the targeted location will be different from the targeted entity. -
getTargets0
- Specified by:
getTargets0in classTargeter
-
getKey
@NotNull public @NotNull org.bukkit.NamespacedKey getKey() -
getWikiLink
Description copied from interface:SerializerReturns a link to the page on the wiki that describes this serializer. This method is called fromSerializeData, and is used to help the user find potential solutions to their problem.- Specified by:
getWikiLinkin interfaceSerializer<Targeter>- Overrides:
getWikiLinkin classTargeter- Returns:
- The nullable link to the wiki.
-
serialize
@NotNull public @NotNull Targeter serialize(@NotNull @NotNull me.deecaad.core.file.SerializeData data) throws me.deecaad.core.file.SerializerException Description copied from interface:SerializerInstantiates a new Object to be added into the finalized configuration. The object should be built off ofSerializeData.getConfig(). If there is any misconfiguration (or any other issue preventing the construction of an object), then this method should throw aSerializerException. This method may not return null.- Parameters:
data- The non-null data containing config- Returns:
- The non-null serialized data.
- Throws:
me.deecaad.core.file.SerializerException- If there is an error in config.
-