Class Trigger
java.lang.Object
me.deecaad.weaponmechanics.weapon.trigger.Trigger
- All Implemented Interfaces:
me.deecaad.core.file.Serializer<Trigger>
-
Constructor Summary
ConstructorsConstructorDescriptionTrigger()Default constructor for serializerTrigger(TriggerType mainhand, TriggerType offhand, Circumstance circumstance, TriggerType dualWieldMainHand, TriggerType dualWieldOffHand) -
Method Summary
Modifier and TypeMethodDescriptionbooleancheck(TriggerType triggerType, org.bukkit.inventory.EquipmentSlot slot, EntityWrapper entityWrapper) Checks if trigger is validbooleancheckCircumstances(EntityWrapper entityWrapper) serialize(me.deecaad.core.file.SerializeData data) 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.Serializer
canUsePathTo, getName, getParentKeywords, getWikiLink, letPassThrough, shouldSerialize, tryPathTo, useLater
-
Constructor Details
-
Trigger
public Trigger()Default constructor for serializer -
Trigger
public Trigger(TriggerType mainhand, TriggerType offhand, Circumstance circumstance, TriggerType dualWieldMainHand, TriggerType dualWieldOffHand)
-
-
Method Details
-
check
public boolean check(TriggerType triggerType, org.bukkit.inventory.EquipmentSlot slot, EntityWrapper entityWrapper) Checks if trigger is valid- Parameters:
triggerType- the trigger typeslot- the slot usedentityWrapper- the entity's wrapper from whom to check- Returns:
- true if trigger is valid
-
checkCircumstances
- Parameters:
entityWrapper- the entity's wrapper from whom to check- Returns:
- true if circumstances are valid
-
getMainhand
- Returns:
- the trigger for main hand
-
getOffhand
- Returns:
- the trigger for off hand
-
getDualWieldMainHand
-
getDualWieldOffHand
-
getKeyword
- Specified by:
getKeywordin interfaceme.deecaad.core.file.Serializer<Trigger>
-
serialize
@NotNull public Trigger serialize(@NotNull me.deecaad.core.file.SerializeData data) throws me.deecaad.core.file.SerializerException - Specified by:
serializein interfaceme.deecaad.core.file.Serializer<Trigger>- Throws:
me.deecaad.core.file.SerializerException
-