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 @NotNull ShootLocationChooser.ShootLocation getDefault()
    • getVR

      @Nullable public @Nullable ShootLocationChooser.ShootLocation getVR()
    • getScope

      @Nullable public @Nullable ShootLocationChooser.ShootLocation getScope()
    • offset

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

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

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

      @NotNull public @NotNull ShootLocationChooser 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<ShootLocationChooser>
      Throws:
      me.deecaad.core.file.SerializerException
    • getControllerPos

      @Nullable public static @Nullable org.bukkit.Location getControllerPos(@NotNull @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