Class DualWield

java.lang.Object
me.deecaad.weaponmechanics.weapon.info.DualWield
All Implemented Interfaces:
me.deecaad.core.file.Serializer<DualWield>

public class DualWield extends Object implements me.deecaad.core.file.Serializer<DualWield>
  • Constructor Summary

    Constructors
    Constructor
    Description
    Default constructor for serializer
    DualWield(boolean whitelist, Set<String> weapons, me.deecaad.core.mechanics.Mechanics mechanics)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    Checks whether or not this can be used with other weapon title
     
    void
    sendDeniedMessage(TriggerType checkCause, @Nullable org.bukkit.entity.Player player, String weaponTitle)
    Simply sends dual wield denied message for player.
    @NotNull DualWield
    serialize(@NotNull me.deecaad.core.file.SerializeData data)
     

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface me.deecaad.core.file.Serializer

    canUsePathTo, getName, getParentKeywords, getWikiLink, letPassThrough, shouldSerialize, tryPathTo, useLater
  • Constructor Details

    • DualWield

      public DualWield()
      Default constructor for serializer
    • DualWield

      public DualWield(boolean whitelist, Set<String> weapons, me.deecaad.core.mechanics.Mechanics mechanics)
  • Method Details

    • denyDualWieldingWith

      public boolean denyDualWieldingWith(String weaponTitle)
      Checks whether or not this can be used with other weapon title
      Parameters:
      weaponTitle - the other weapon title
      Returns:
      true only if dual wielding is allowed
    • sendDeniedMessage

      public void sendDeniedMessage(TriggerType checkCause, @Nullable @Nullable org.bukkit.entity.Player player, String weaponTitle)
      Simply sends dual wield denied message for player. Message is only sent if dual wield check cause is same as weapon's shoot, scope or reload trigger type.
      Parameters:
      checkCause - the cause of this dual wield check
      player - the player for who to send
      weaponTitle - the weapon used
    • getKeyword

      public String getKeyword()
      Specified by:
      getKeyword in interface me.deecaad.core.file.Serializer<DualWield>
    • serialize

      @NotNull public @NotNull DualWield serialize(@NotNull @NotNull me.deecaad.core.file.SerializeData data) throws me.deecaad.core.file.SerializerException
      Specified by:
      serialize in interface me.deecaad.core.file.Serializer<DualWield>
      Throws:
      me.deecaad.core.file.SerializerException