Class Condition
java.lang.Object
me.deecaad.core.mechanics.conditions.Condition
- All Implemented Interfaces:
InlineSerializer<Condition>,Serializer<Condition>,net.kyori.adventure.key.Keyed,org.bukkit.Keyed
- Direct Known Subclasses:
BiomeCondition,EntityTypeCondition,GlidingCondition,HasPermissionCondition,InConeCondition,LightLevelCondition,MaterialCategoryCondition,OnGroundCondition,RangeCondition,RidingCondition,SneakingCondition,SprintingCondition
A condition is a simple true/false statement that decides whether a
Mechanic is allowed
to be used (on a specific entity, in a specific world, etc.).-
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 TypeMethodDescriptionprotected ConditionapplyParentArgs(me.deecaad.core.file.SerializeData data, Condition condition) @Nullable StringReturns a link to the page on the wiki that describes this serializer.final booleanReturnstrueifMechanicthat holds this condition is allowed to be used.protected abstract booleanisAllowed0(CastData cast) Methods 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, getKey, getKeyword, shouldSerializeMethods inherited from interface org.bukkit.Keyed
keyMethods inherited from interface me.deecaad.core.file.Serializer
canUsePathTo, getName, getParentKeywords, letPassThrough, serialize, tryPathTo, useLater
-
Constructor Details
-
Condition
public Condition()
-
-
Method Details
-
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<Condition>- Returns:
- The nullable link to the wiki.
-
isAllowed
ReturnstrueifMechanicthat holds this condition is allowed to be used.- Parameters:
cast- The non-null data involving the who/what/where.- Returns:
- true if the mechanic can be used.
-
isAllowed0
-
applyParentArgs
protected Condition applyParentArgs(me.deecaad.core.file.SerializeData data, Condition condition) throws me.deecaad.core.file.SerializerException - Throws:
me.deecaad.core.file.SerializerException
-