package in.twizmwaz.cardinal.module.modules.regions.type;

import in.twizmwaz.cardinal.GameHandler;
import in.twizmwaz.cardinal.module.modules.regions.parsers.PointParser;
import org.bukkit.block.Block;
import org.bukkit.util.BlockVector;
import org.bukkit.util.Vector;

public class PointRegion extends BlockRegion {

    private final Vector look;

    public PointRegion(String name, Vector vector, Vector look) {
        super(name, vector);
        this.look = look;
    }

    public PointRegion(String name, double x, double y, double z) {
        super(name, x, y, z);
        this.look = new BlockVector();
    }

    public PointRegion(PointParser parser) {
        this(parser.getName(), parser.getVector(), parser.getLook());
    }

    public PointRegion(String name, Vector vector) {
        this(name, vector, new BlockVector());
    }

    @Override
    public Vector getVector() {
        return vector.clone();
    }

    public float getYaw() {
        return vector.toLocation(null).getYaw();
    }

    public float getPitch() {
        return vector.toLocation(null).getPitch();
    }

    public Block getBlock() {
        return vector.toLocation(GameHandler.getGameHandler().getMatchWorld()).getBlock();
    }

    public Vector getLook() {
        return look;
    }
}

@@ -161,24 +161,52 @@
 ointParser;%0A
+import org.bukkit.Location;%0A
 import org.b
@@ -949,32 +949,294 @@
 clone();%0A    %7D%0A%0A
+    @Override%0A    public PointRegion getRandomPoint() %7B%0A        return this;%0A    %7D%0A%0A    @Override%0A    public Location getLocation() %7B%0A        return new Location(GameHandler.getGameHandler().getMatchWorld(), getX(), getY(), getZ(), getYaw(), getPitch());%0A    %7D%0A%0A
     public float

Improve handling of point regions