Class ScatterTargeter

All Implemented Interfaces:
InlineSerializer<Targeter>, Serializer<Targeter>, net.kyori.adventure.key.Keyed, org.bukkit.Keyed

public class ScatterTargeter extends ShapeTargeter
Strictly speaking, a random assortment of points is not a shape. But the shape targeter targets a list of points, not a shape, so this is fine.
  • Constructor Details

    • ScatterTargeter

      public ScatterTargeter()
      Default constructor for serializer
    • ScatterTargeter

      public ScatterTargeter(int points, double horizontalRange, double verticalRange, boolean isTraceDown)
  • Method Details

    • getPoints

      @NotNull public @NotNull Iterator<org.bukkit.util.Vector> getPoints(@NotNull @NotNull CastData cast)
      Specified by:
      getPoints in class ShapeTargeter
    • getKey

      @NotNull public @NotNull org.bukkit.NamespacedKey getKey()
    • serialize

      @NotNull public @NotNull Targeter serialize(@NotNull @NotNull me.deecaad.core.file.SerializeData data) throws me.deecaad.core.file.SerializerException
      Description copied from interface: Serializer
      Instantiates a new Object to be added into the finalized configuration. The object should be built off of SerializeData.getConfig(). If there is any misconfiguration (or any other issue preventing the construction of an object), then this method should throw a SerializerException. This method may not return null.
      Parameters:
      data - The non-null data containing config
      Returns:
      The non-null serialized data.
      Throws:
      me.deecaad.core.file.SerializerException - If there is an error in config.