Class ShootLocationChooser

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

public class ShootLocationChooser extends Object implements me.deecaad.core.file.Serializer<ShootLocationChooser>
People can choose where the bullet is offset from depending on VR/Scope.
  • Constructor Details

  • Method Details

    • getDefault

      @NotNull public ShootLocationChooser.ShootLocation getDefault()
    • getVR

      @Nullable public ShootLocationChooser.ShootLocation getVR()
    • getScope

      @Nullable public ShootLocationChooser.ShootLocation getScope()
    • offset

      @NotNull public org.bukkit.Location offset(@NotNull EntityWrapper wrapper, boolean isMainHand)
    • getKeyword

      @Nullable public String getKeyword()
      Specified by:
      getKeyword in interface me.deecaad.core.file.Serializer<ShootLocationChooser>
    • getParentKeywords

      @Nullable public List<String> getParentKeywords()
      Specified by:
      getParentKeywords in interface me.deecaad.core.file.Serializer<ShootLocationChooser>
    • serialize

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

      @Nullable public static org.bukkit.Location getControllerPos(@NotNull org.bukkit.entity.LivingEntity entity, boolean isMainHand)
      Gets the controller position of the given entity. If the entity is not a Vivecraft player, or the Vivecraft plugin is not installed, this will return null.
      Parameters:
      entity - The entity to get the controller position from.
      isMainHand - true if the main hand is being used.
      Returns:
      The controller position, or null