Fix 2.6.4 Skript support & fix compilation
This commit is contained in:
parent
a69f531562
commit
f08c74cfb9
14
biosphere2.iml
Normal file
14
biosphere2.iml
Normal file
@ -0,0 +1,14 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<module version="4">
|
||||
<component name="FacetManager">
|
||||
<facet type="minecraft" name="Minecraft">
|
||||
<configuration>
|
||||
<autoDetectTypes>
|
||||
<platformType>SPIGOT</platformType>
|
||||
<platformType>PAPER</platformType>
|
||||
<platformType>BUKKIT</platformType>
|
||||
</autoDetectTypes>
|
||||
</configuration>
|
||||
</facet>
|
||||
</component>
|
||||
</module>
|
48
pom.xml
Normal file → Executable file
48
pom.xml
Normal file → Executable file
@ -6,58 +6,50 @@
|
||||
|
||||
<groupId>io.github.bi0qaw</groupId>
|
||||
<artifactId>biosphere2</artifactId>
|
||||
<version>1.0.2</version>
|
||||
<version>1.0.3</version>
|
||||
<build>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-compiler-plugin</artifactId>
|
||||
<configuration>
|
||||
<source>1.6</source>
|
||||
<target>1.6</target>
|
||||
<source>1.8</source>
|
||||
<target>1.8</target>
|
||||
</configuration>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
|
||||
<repositories>
|
||||
<repository>
|
||||
<id>bensku-repo</id>
|
||||
<url>https://raw.githubusercontent.com/bensku/mvn-repo/master</url>
|
||||
</repository>
|
||||
<repository>
|
||||
<id>spigot-repo</id>
|
||||
<url>https://hub.spigotmc.org/nexus/content/repositories/snapshots/</url>
|
||||
<snapshots>
|
||||
<enabled>true</enabled>
|
||||
<updatePolicy>daily</updatePolicy>
|
||||
</snapshots>
|
||||
<url>https://hub.spigotmc.org/nexus/content/repositories/snapshots/org/spigotmc/spigot-api/</url>
|
||||
</repository>
|
||||
<repository>
|
||||
<id>sk89q-repo</id>
|
||||
<url>http://maven.sk89q.com/repo</url>
|
||||
<id>jitpack.io</id>
|
||||
<url>https://jitpack.io</url>
|
||||
</repository>
|
||||
<repository>
|
||||
<id>destroystokyo-repo</id>
|
||||
<id>mvnrepository</id>
|
||||
<url>https://mvnrepository.com</url>
|
||||
</repository>
|
||||
<repository>
|
||||
<id>PaperMC</id>
|
||||
<url>https://repo.destroystokyo.com/repository/maven-public/</url>
|
||||
</repository>
|
||||
<repository>
|
||||
<id>vault-repo</id>
|
||||
<url>http://nexus.hc.to/content/repositories/pub_releases</url>
|
||||
</repository>
|
||||
<repository>
|
||||
<id>jitpack-repo</id>
|
||||
<url>https://jitpack.io</url>
|
||||
<id>sk89q</id>
|
||||
<url>http://maven.sk89q.com/repo</url>
|
||||
</repository>
|
||||
</repositories>
|
||||
|
||||
<dependencies>
|
||||
<!--Skript-->
|
||||
<dependency>
|
||||
<groupId>ch.njol</groupId>
|
||||
<artifactId>skript</artifactId>
|
||||
<version>2.2-dev32</version>
|
||||
<scope>compile</scope>
|
||||
<groupId>com.github.SkriptLang</groupId>
|
||||
<artifactId>Skript</artifactId>
|
||||
<version>2.6.1</version>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
<!--Spigot API-->
|
||||
<dependency>
|
||||
@ -66,6 +58,12 @@
|
||||
<version>1.12.2-R0.1-SNAPSHOT</version>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.jetbrains</groupId>
|
||||
<artifactId>annotations</artifactId>
|
||||
<version>RELEASE</version>
|
||||
<scope>compile</scope>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
</project>
|
0
scripts/biosphere-test.sk
Normal file → Executable file
0
scripts/biosphere-test.sk
Normal file → Executable file
0
scripts/gallery.sk
Normal file → Executable file
0
scripts/gallery.sk
Normal file → Executable file
17
src/main/java/io/github/bi0qaw/biosphere/Biosphere.java
Normal file → Executable file
17
src/main/java/io/github/bi0qaw/biosphere/Biosphere.java
Normal file → Executable file
@ -1,22 +1,19 @@
|
||||
package io.github.bi0qaw.biosphere;
|
||||
|
||||
import io.github.bi0qaw.biosphere.expression.*;
|
||||
import ch.njol.skript.Skript;
|
||||
import ch.njol.skript.SkriptAddon;
|
||||
import ch.njol.skript.lang.ExpressionType;
|
||||
import io.github.bi0qaw.biosphere.expression.*;
|
||||
import io.github.bi0qaw.biosphere.type.FrameType;
|
||||
import io.github.bi0qaw.biosphere.util.Frame;
|
||||
import org.bukkit.Location;
|
||||
import org.bukkit.plugin.java.JavaPlugin;
|
||||
import org.bukkit.util.Vector;
|
||||
import io.github.bi0qaw.biosphere.type.FrameType;
|
||||
import io.github.bi0qaw.biosphere.util.Frame;
|
||||
|
||||
public class Biosphere extends JavaPlugin {
|
||||
|
||||
private static Biosphere plugin;
|
||||
|
||||
public void onEnable(){
|
||||
|
||||
plugin = this;
|
||||
Skript.registerAddon(this);
|
||||
SkriptAddon addon = Skript.registerAddon(this);
|
||||
|
||||
new FrameType();
|
||||
|
||||
@ -74,8 +71,4 @@ public class Biosphere extends JavaPlugin {
|
||||
Skript.registerExpression(ExprVectorSphere.class, Vector.class, ExpressionType.SIMPLE, "[vector ]sphere with radius %number%(,| and) density %number%");
|
||||
Skript.registerExpression(ExprVectorSphereRand.class, Vector.class, ExpressionType.SIMPLE, "[vector ]random sphere with radius %number%(,| and) density %number%");
|
||||
}
|
||||
|
||||
public static Biosphere getPlugin() {
|
||||
return plugin;
|
||||
}
|
||||
}
|
||||
|
@ -4,7 +4,7 @@ import ch.njol.skript.doc.Description;
|
||||
import ch.njol.skript.doc.Examples;
|
||||
import ch.njol.skript.doc.Name;
|
||||
import org.bukkit.event.Event;
|
||||
import javax.annotation.Nullable;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
import ch.njol.skript.lang.Expression;
|
||||
import ch.njol.skript.lang.SkriptParser.ParseResult;
|
||||
|
0
src/main/java/io/github/bi0qaw/biosphere/expression/ExprFrameFromEntity.java
Normal file → Executable file
0
src/main/java/io/github/bi0qaw/biosphere/expression/ExprFrameFromEntity.java
Normal file → Executable file
0
src/main/java/io/github/bi0qaw/biosphere/expression/ExprFrameFromYawPitch.java
Normal file → Executable file
0
src/main/java/io/github/bi0qaw/biosphere/expression/ExprFrameFromYawPitch.java
Normal file → Executable file
0
src/main/java/io/github/bi0qaw/biosphere/expression/ExprFrameYawPitch.java
Normal file → Executable file
0
src/main/java/io/github/bi0qaw/biosphere/expression/ExprFrameYawPitch.java
Normal file → Executable file
0
src/main/java/io/github/bi0qaw/biosphere/expression/ExprLocationBox.java
Normal file → Executable file
0
src/main/java/io/github/bi0qaw/biosphere/expression/ExprLocationBox.java
Normal file → Executable file
0
src/main/java/io/github/bi0qaw/biosphere/expression/ExprLocationBoxOutline.java
Normal file → Executable file
0
src/main/java/io/github/bi0qaw/biosphere/expression/ExprLocationBoxOutline.java
Normal file → Executable file
@ -8,7 +8,7 @@ import io.github.bi0qaw.biosphere.util.VectorLib;
|
||||
import org.bukkit.Location;
|
||||
import org.bukkit.event.Event;
|
||||
|
||||
import javax.annotation.Nullable;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
import ch.njol.skript.lang.Expression;
|
||||
import ch.njol.skript.lang.SkriptParser.ParseResult;
|
||||
|
@ -8,7 +8,7 @@ import io.github.bi0qaw.biosphere.util.VectorLib;
|
||||
import org.bukkit.Location;
|
||||
import org.bukkit.event.Event;
|
||||
|
||||
import javax.annotation.Nullable;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
import ch.njol.skript.lang.Expression;
|
||||
import ch.njol.skript.lang.SkriptParser.ParseResult;
|
||||
|
@ -3,18 +3,15 @@ package io.github.bi0qaw.biosphere.expression;
|
||||
import ch.njol.skript.doc.Description;
|
||||
import ch.njol.skript.doc.Examples;
|
||||
import ch.njol.skript.doc.Name;
|
||||
import io.github.bi0qaw.biosphere.util.LocationLib;
|
||||
import io.github.bi0qaw.biosphere.util.VectorLib;
|
||||
import org.bukkit.Location;
|
||||
import org.bukkit.event.Event;
|
||||
|
||||
import javax.annotation.Nullable;
|
||||
|
||||
import ch.njol.skript.lang.Expression;
|
||||
import ch.njol.skript.lang.SkriptParser.ParseResult;
|
||||
import ch.njol.skript.lang.util.SimpleExpression;
|
||||
import ch.njol.util.Kleenean;
|
||||
import org.bukkit.util.Vector;
|
||||
import io.github.bi0qaw.biosphere.util.LocationLib;
|
||||
import org.bukkit.Location;
|
||||
import org.bukkit.event.Event;
|
||||
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
@Name("Location Cube Outline")
|
||||
@Description("Creates a list of locations in the shape of a cube, including the corners and vertices of the cube. The density value controls the amount of points. A higher number increases the amount of points. A density of 1 corresponds to 1 point per block.")
|
||||
|
@ -7,7 +7,7 @@ import io.github.bi0qaw.biosphere.util.LocationLib;
|
||||
import io.github.bi0qaw.biosphere.util.VectorMath;
|
||||
import org.bukkit.Location;
|
||||
import org.bukkit.event.Event;
|
||||
import javax.annotation.Nullable;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
import ch.njol.skript.lang.Expression;
|
||||
import ch.njol.skript.lang.SkriptParser.ParseResult;
|
||||
|
@ -7,7 +7,7 @@ import io.github.bi0qaw.biosphere.util.LocationLib;
|
||||
import io.github.bi0qaw.biosphere.util.VectorLib;
|
||||
import org.bukkit.Location;
|
||||
import org.bukkit.event.Event;
|
||||
import javax.annotation.Nullable;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
import ch.njol.skript.lang.Expression;
|
||||
import ch.njol.skript.lang.SkriptParser.ParseResult;
|
||||
|
@ -3,21 +3,14 @@ package io.github.bi0qaw.biosphere.expression;
|
||||
import ch.njol.skript.doc.Description;
|
||||
import ch.njol.skript.doc.Examples;
|
||||
import ch.njol.skript.doc.Name;
|
||||
import io.github.bi0qaw.biosphere.util.LocationLib;
|
||||
import io.github.bi0qaw.biosphere.util.VectorLib;
|
||||
import org.bukkit.Location;
|
||||
import org.bukkit.event.Event;
|
||||
|
||||
import javax.annotation.Nullable;
|
||||
|
||||
import ch.njol.skript.lang.Expression;
|
||||
import ch.njol.skript.lang.SkriptParser.ParseResult;
|
||||
import ch.njol.skript.lang.util.SimpleExpression;
|
||||
import ch.njol.util.Kleenean;
|
||||
import org.bukkit.util.Vector;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import io.github.bi0qaw.biosphere.util.LocationLib;
|
||||
import org.bukkit.Location;
|
||||
import org.bukkit.event.Event;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
@Name("Location Line")
|
||||
@Description("Creates a list of locations in the shape of a line. The density value controls the amount of points. A higher number increases the amount of points. A density of 1 corresponds to 1 point per block.")
|
||||
|
@ -9,8 +9,7 @@ import io.github.bi0qaw.biosphere.util.VectorMath;
|
||||
import org.bukkit.Location;
|
||||
import org.bukkit.event.Event;
|
||||
|
||||
import javax.annotation.Nullable;
|
||||
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
import ch.njol.skript.lang.Expression;
|
||||
import ch.njol.skript.lang.SkriptParser.ParseResult;
|
||||
import ch.njol.skript.lang.util.SimpleExpression;
|
||||
|
@ -3,17 +3,15 @@ package io.github.bi0qaw.biosphere.expression;
|
||||
import ch.njol.skript.doc.Description;
|
||||
import ch.njol.skript.doc.Examples;
|
||||
import ch.njol.skript.doc.Name;
|
||||
import io.github.bi0qaw.biosphere.util.LocationLib;
|
||||
import io.github.bi0qaw.biosphere.util.TrigLib;
|
||||
import org.bukkit.Location;
|
||||
import org.bukkit.event.Event;
|
||||
|
||||
import javax.annotation.Nullable;
|
||||
|
||||
import ch.njol.skript.lang.Expression;
|
||||
import ch.njol.skript.lang.SkriptParser.ParseResult;
|
||||
import ch.njol.skript.lang.util.SimpleExpression;
|
||||
import ch.njol.util.Kleenean;
|
||||
import io.github.bi0qaw.biosphere.util.LocationLib;
|
||||
import org.bukkit.Location;
|
||||
import org.bukkit.event.Event;
|
||||
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
@Name("Location Link All")
|
||||
@Description("Creates a list of locations linking multiple locations with lines. The density value controls the amount of points. A higher number increases the amount of points. A density of 1 corresponds to 1 point per block.")
|
||||
|
@ -8,7 +8,7 @@ import io.github.bi0qaw.biosphere.util.TrigLib;
|
||||
import org.bukkit.Location;
|
||||
import org.bukkit.event.Event;
|
||||
|
||||
import javax.annotation.Nullable;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
import ch.njol.skript.lang.Expression;
|
||||
import ch.njol.skript.lang.SkriptParser.ParseResult;
|
||||
|
@ -6,7 +6,7 @@ import ch.njol.skript.doc.Name;
|
||||
import io.github.bi0qaw.biosphere.util.LocationLib;
|
||||
import org.bukkit.Location;
|
||||
import org.bukkit.event.Event;
|
||||
import javax.annotation.Nullable;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
import ch.njol.skript.lang.Expression;
|
||||
import ch.njol.skript.lang.SkriptParser.ParseResult;
|
||||
|
0
src/main/java/io/github/bi0qaw/biosphere/expression/ExprLocationOffset.java
Normal file → Executable file
0
src/main/java/io/github/bi0qaw/biosphere/expression/ExprLocationOffset.java
Normal file → Executable file
0
src/main/java/io/github/bi0qaw/biosphere/expression/ExprLocationPath.java
Normal file → Executable file
0
src/main/java/io/github/bi0qaw/biosphere/expression/ExprLocationPath.java
Normal file → Executable file
@ -8,7 +8,7 @@ import io.github.bi0qaw.biosphere.util.TrigLib;
|
||||
import org.bukkit.Location;
|
||||
import org.bukkit.event.Event;
|
||||
|
||||
import javax.annotation.Nullable;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
import ch.njol.skript.lang.Expression;
|
||||
import ch.njol.skript.lang.SkriptParser.ParseResult;
|
||||
|
@ -8,7 +8,7 @@ import io.github.bi0qaw.biosphere.util.TrigLib;
|
||||
import org.bukkit.Location;
|
||||
import org.bukkit.event.Event;
|
||||
|
||||
import javax.annotation.Nullable;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
import ch.njol.skript.lang.Expression;
|
||||
import ch.njol.skript.lang.SkriptParser.ParseResult;
|
||||
|
@ -8,7 +8,7 @@ import io.github.bi0qaw.biosphere.util.TrigLib;
|
||||
import org.bukkit.Location;
|
||||
import org.bukkit.event.Event;
|
||||
|
||||
import javax.annotation.Nullable;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
import ch.njol.skript.lang.Expression;
|
||||
import ch.njol.skript.lang.SkriptParser.ParseResult;
|
||||
|
@ -7,7 +7,7 @@ import io.github.bi0qaw.biosphere.util.LocationLib;
|
||||
import org.bukkit.Location;
|
||||
import org.bukkit.event.Event;
|
||||
|
||||
import javax.annotation.Nullable;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
import ch.njol.skript.lang.Expression;
|
||||
import ch.njol.skript.lang.SkriptParser;
|
||||
|
@ -7,7 +7,7 @@ import io.github.bi0qaw.biosphere.util.LocationLib;
|
||||
import org.bukkit.Location;
|
||||
import org.bukkit.event.Event;
|
||||
|
||||
import javax.annotation.Nullable;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
import ch.njol.skript.lang.Expression;
|
||||
import ch.njol.skript.lang.SkriptParser;
|
||||
|
@ -8,7 +8,7 @@ import io.github.bi0qaw.biosphere.util.TrigLib;
|
||||
import org.bukkit.Location;
|
||||
import org.bukkit.event.Event;
|
||||
|
||||
import javax.annotation.Nullable;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
import ch.njol.skript.lang.Expression;
|
||||
import ch.njol.skript.lang.SkriptParser.ParseResult;
|
||||
|
@ -8,7 +8,7 @@ import io.github.bi0qaw.biosphere.util.TrigLib;
|
||||
import org.bukkit.Location;
|
||||
import org.bukkit.event.Event;
|
||||
|
||||
import javax.annotation.Nullable;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
import ch.njol.skript.lang.Expression;
|
||||
import ch.njol.skript.lang.SkriptParser.ParseResult;
|
||||
|
@ -9,7 +9,7 @@ import io.github.bi0qaw.biosphere.util.VectorMath;
|
||||
import org.bukkit.Location;
|
||||
import org.bukkit.event.Event;
|
||||
|
||||
import javax.annotation.Nullable;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
import ch.njol.skript.lang.Expression;
|
||||
import ch.njol.skript.lang.SkriptParser.ParseResult;
|
||||
|
@ -8,7 +8,7 @@ import io.github.bi0qaw.biosphere.util.TrigLib;
|
||||
import org.bukkit.Location;
|
||||
import org.bukkit.event.Event;
|
||||
|
||||
import javax.annotation.Nullable;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
import ch.njol.skript.lang.Expression;
|
||||
import ch.njol.skript.lang.SkriptParser.ParseResult;
|
||||
|
@ -4,7 +4,7 @@ import ch.njol.skript.doc.Description;
|
||||
import ch.njol.skript.doc.Examples;
|
||||
import ch.njol.skript.doc.Name;
|
||||
import org.bukkit.event.Event;
|
||||
import javax.annotation.Nullable;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
import ch.njol.skript.lang.Expression;
|
||||
import ch.njol.skript.lang.SkriptParser.ParseResult;
|
||||
|
0
src/main/java/io/github/bi0qaw/biosphere/expression/ExprVectorBox.java
Normal file → Executable file
0
src/main/java/io/github/bi0qaw/biosphere/expression/ExprVectorBox.java
Normal file → Executable file
0
src/main/java/io/github/bi0qaw/biosphere/expression/ExprVectorBoxOutline.java
Normal file → Executable file
0
src/main/java/io/github/bi0qaw/biosphere/expression/ExprVectorBoxOutline.java
Normal file → Executable file
2
src/main/java/io/github/bi0qaw/biosphere/expression/ExprVectorCircle.java
Normal file → Executable file
2
src/main/java/io/github/bi0qaw/biosphere/expression/ExprVectorCircle.java
Normal file → Executable file
@ -11,7 +11,7 @@ import org.bukkit.event.Event;
|
||||
import org.bukkit.util.Vector;
|
||||
import io.github.bi0qaw.biosphere.util.VectorLib;
|
||||
|
||||
import javax.annotation.Nullable;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
@Name("Vector Circle")
|
||||
@Description("Creates a list of vectors in the shape of a circle")
|
||||
|
2
src/main/java/io/github/bi0qaw/biosphere/expression/ExprVectorCube.java
Normal file → Executable file
2
src/main/java/io/github/bi0qaw/biosphere/expression/ExprVectorCube.java
Normal file → Executable file
@ -11,7 +11,7 @@ import org.bukkit.event.Event;
|
||||
import org.bukkit.util.Vector;
|
||||
import io.github.bi0qaw.biosphere.util.VectorLib;
|
||||
|
||||
import javax.annotation.Nullable;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
@Name("Vector Cube")
|
||||
@Description("Creates a list of vectors in the shape of a cube (only the corners!). To get a list of locations including the cube edges use cube outline.")
|
||||
|
2
src/main/java/io/github/bi0qaw/biosphere/expression/ExprVectorCubeOutline.java
Normal file → Executable file
2
src/main/java/io/github/bi0qaw/biosphere/expression/ExprVectorCubeOutline.java
Normal file → Executable file
@ -11,7 +11,7 @@ import org.bukkit.event.Event;
|
||||
import org.bukkit.util.Vector;
|
||||
import io.github.bi0qaw.biosphere.util.VectorLib;
|
||||
|
||||
import javax.annotation.Nullable;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
@Name("Vector Cube Outline")
|
||||
@Description("Creates a list of vectors in the shape of a polygon including corners and edges. The density value controls the amount of points. A higher number increases the amount of points. A density of 1 corresponds to 1 point per block.")
|
||||
|
2
src/main/java/io/github/bi0qaw/biosphere/expression/ExprVectorHelix.java
Normal file → Executable file
2
src/main/java/io/github/bi0qaw/biosphere/expression/ExprVectorHelix.java
Normal file → Executable file
@ -11,7 +11,7 @@ import org.bukkit.event.Event;
|
||||
import org.bukkit.util.Vector;
|
||||
import io.github.bi0qaw.biosphere.util.VectorLib;
|
||||
|
||||
import javax.annotation.Nullable;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
@Name("Vector Helix")
|
||||
@Description("Creates a list of vectors in the shape of a helix. The step parameter determines how many blocks the helix will go upwards in one rotation. The density value controls the amount of points. A higher number increases the amount of points. A density of 1 corresponds to 1 point per block.")
|
||||
|
0
src/main/java/io/github/bi0qaw/biosphere/expression/ExprVectorInFrame.java
Normal file → Executable file
0
src/main/java/io/github/bi0qaw/biosphere/expression/ExprVectorInFrame.java
Normal file → Executable file
2
src/main/java/io/github/bi0qaw/biosphere/expression/ExprVectorLine.java
Normal file → Executable file
2
src/main/java/io/github/bi0qaw/biosphere/expression/ExprVectorLine.java
Normal file → Executable file
@ -11,7 +11,7 @@ import org.bukkit.event.Event;
|
||||
import org.bukkit.util.Vector;
|
||||
import io.github.bi0qaw.biosphere.util.VectorLib;
|
||||
|
||||
import javax.annotation.Nullable;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
@Name("Vector Line")
|
||||
@Description("Creates a list of vectors in the shape of a line. The density value controls the amount of points. A higher number increases the amount of points. A density of 1 corresponds to 1 point per block.")
|
||||
|
0
src/main/java/io/github/bi0qaw/biosphere/expression/ExprVectorLineBetweenVectors.java
Normal file → Executable file
0
src/main/java/io/github/bi0qaw/biosphere/expression/ExprVectorLineBetweenVectors.java
Normal file → Executable file
2
src/main/java/io/github/bi0qaw/biosphere/expression/ExprVectorLinkAll.java
Normal file → Executable file
2
src/main/java/io/github/bi0qaw/biosphere/expression/ExprVectorLinkAll.java
Normal file → Executable file
@ -11,7 +11,7 @@ import org.bukkit.event.Event;
|
||||
import org.bukkit.util.Vector;
|
||||
import io.github.bi0qaw.biosphere.util.VectorLib;
|
||||
|
||||
import javax.annotation.Nullable;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
@Name("Vector Link All")
|
||||
@Description("Creates a list of vectors linking multiple vectors with lines. The density value controls the amount of points. A higher number increases the amount of points. A density of 1 corresponds to 1 point per block.")
|
||||
|
4
src/main/java/io/github/bi0qaw/biosphere/expression/ExprVectorMidpoint.java
Normal file → Executable file
4
src/main/java/io/github/bi0qaw/biosphere/expression/ExprVectorMidpoint.java
Normal file → Executable file
@ -7,11 +7,11 @@ import ch.njol.skript.lang.Expression;
|
||||
import ch.njol.skript.lang.SkriptParser;
|
||||
import ch.njol.skript.lang.util.SimpleExpression;
|
||||
import ch.njol.util.Kleenean;
|
||||
import io.github.bi0qaw.biosphere.util.VectorLib;
|
||||
import org.bukkit.event.Event;
|
||||
import org.bukkit.util.Vector;
|
||||
import io.github.bi0qaw.biosphere.util.VectorLib;
|
||||
|
||||
import javax.annotation.Nullable;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
@Name("Vector Midpoint")
|
||||
@Description("Gives the midpoint between vectors.")
|
||||
|
2
src/main/java/io/github/bi0qaw/biosphere/expression/ExprVectorMove.java
Normal file → Executable file
2
src/main/java/io/github/bi0qaw/biosphere/expression/ExprVectorMove.java
Normal file → Executable file
@ -11,7 +11,7 @@ import org.bukkit.event.Event;
|
||||
import org.bukkit.util.Vector;
|
||||
import io.github.bi0qaw.biosphere.util.VectorLib;
|
||||
|
||||
import javax.annotation.Nullable;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
@Name("Vector Offset")
|
||||
@Description("Offset vectors by other vectors.")
|
||||
|
0
src/main/java/io/github/bi0qaw/biosphere/expression/ExprVectorOffset.java
Normal file → Executable file
0
src/main/java/io/github/bi0qaw/biosphere/expression/ExprVectorOffset.java
Normal file → Executable file
0
src/main/java/io/github/bi0qaw/biosphere/expression/ExprVectorPath.java
Normal file → Executable file
0
src/main/java/io/github/bi0qaw/biosphere/expression/ExprVectorPath.java
Normal file → Executable file
2
src/main/java/io/github/bi0qaw/biosphere/expression/ExprVectorPolygon.java
Normal file → Executable file
2
src/main/java/io/github/bi0qaw/biosphere/expression/ExprVectorPolygon.java
Normal file → Executable file
@ -11,7 +11,7 @@ import org.bukkit.event.Event;
|
||||
import org.bukkit.util.Vector;
|
||||
import io.github.bi0qaw.biosphere.util.VectorLib;
|
||||
|
||||
import javax.annotation.Nullable;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
@Name("Vector Polygon")
|
||||
@Description("Creates a list of vectors in the shape of a polygon (only the corners!). If you want a polygon with edges use polygon outline.")
|
||||
|
2
src/main/java/io/github/bi0qaw/biosphere/expression/ExprVectorPolygonOutline.java
Normal file → Executable file
2
src/main/java/io/github/bi0qaw/biosphere/expression/ExprVectorPolygonOutline.java
Normal file → Executable file
@ -11,7 +11,7 @@ import org.bukkit.event.Event;
|
||||
import org.bukkit.util.Vector;
|
||||
import io.github.bi0qaw.biosphere.util.VectorLib;
|
||||
|
||||
import javax.annotation.Nullable;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
@Name("Vector Polygon Outline")
|
||||
@Description("Creates a list of vectors in the shape of a polygon including corners and edges. The density value controls the amount of points. A higher number increases the amount of points. A density of 1 corresponds to 1 point per block.")
|
||||
|
2
src/main/java/io/github/bi0qaw/biosphere/expression/ExprVectorReflection.java
Normal file → Executable file
2
src/main/java/io/github/bi0qaw/biosphere/expression/ExprVectorReflection.java
Normal file → Executable file
@ -11,7 +11,7 @@ import org.bukkit.event.Event;
|
||||
import org.bukkit.util.Vector;
|
||||
import io.github.bi0qaw.biosphere.util.VectorLib;
|
||||
|
||||
import javax.annotation.Nullable;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
@Name("Vector Reflection")
|
||||
@Description("Mirrors vectors in another vector. The direction parameter applies an additional scaling for each axis.")
|
||||
|
2
src/main/java/io/github/bi0qaw/biosphere/expression/ExprVectorRotate.java
Normal file → Executable file
2
src/main/java/io/github/bi0qaw/biosphere/expression/ExprVectorRotate.java
Normal file → Executable file
@ -12,7 +12,7 @@ import org.bukkit.event.Event;
|
||||
import org.bukkit.util.Vector;
|
||||
import io.github.bi0qaw.biosphere.util.VectorLib;
|
||||
|
||||
import javax.annotation.Nullable;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
@Name("Vector Rotate")
|
||||
@Description("Rotates vectors around a rotation center and a rotation axis by an angle.")
|
||||
|
2
src/main/java/io/github/bi0qaw/biosphere/expression/ExprVectorRotateXYZ.java
Normal file → Executable file
2
src/main/java/io/github/bi0qaw/biosphere/expression/ExprVectorRotateXYZ.java
Normal file → Executable file
@ -11,7 +11,7 @@ import org.bukkit.event.Event;
|
||||
import org.bukkit.util.Vector;
|
||||
import io.github.bi0qaw.biosphere.util.VectorLib;
|
||||
|
||||
import javax.annotation.Nullable;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
@Name("Vector Rotate XYZ")
|
||||
@Description("Rotates vectors around a rotation center and rotation axis by an angle.")
|
||||
|
2
src/main/java/io/github/bi0qaw/biosphere/expression/ExprVectorScale.java
Normal file → Executable file
2
src/main/java/io/github/bi0qaw/biosphere/expression/ExprVectorScale.java
Normal file → Executable file
@ -11,7 +11,7 @@ import org.bukkit.event.Event;
|
||||
import org.bukkit.util.Vector;
|
||||
import io.github.bi0qaw.biosphere.util.VectorLib;
|
||||
|
||||
import javax.annotation.Nullable;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
@Name("Vector Scale")
|
||||
@Description("Scales vectors by a scaling factor and an optional direction. The direction parameter adds an additional scaling along the x-, y- and z-axis.")
|
||||
|
2
src/main/java/io/github/bi0qaw/biosphere/expression/ExprVectorSphere.java
Normal file → Executable file
2
src/main/java/io/github/bi0qaw/biosphere/expression/ExprVectorSphere.java
Normal file → Executable file
@ -11,7 +11,7 @@ import org.bukkit.event.Event;
|
||||
import org.bukkit.util.Vector;
|
||||
import io.github.bi0qaw.biosphere.util.VectorLib;
|
||||
|
||||
import javax.annotation.Nullable;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
@Name("Vector Sphere")
|
||||
@Description("Creates a list of vectors in the shape of a sphere. The density value controls the amount of points. A higher number increases the amount of points. A density of 1 corresponds to 1 point per block.")
|
||||
|
2
src/main/java/io/github/bi0qaw/biosphere/expression/ExprVectorSphereRand.java
Normal file → Executable file
2
src/main/java/io/github/bi0qaw/biosphere/expression/ExprVectorSphereRand.java
Normal file → Executable file
@ -11,7 +11,7 @@ import org.bukkit.event.Event;
|
||||
import org.bukkit.util.Vector;
|
||||
import io.github.bi0qaw.biosphere.util.VectorLib;
|
||||
|
||||
import javax.annotation.Nullable;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
@Name("Vector Random Sphere")
|
||||
@Description("Creates a list of vectors in the shape of a sphere. The locations are randomly distributed on the sphere surface.")
|
||||
|
23
src/main/java/io/github/bi0qaw/biosphere/type/FrameType.java
Normal file → Executable file
23
src/main/java/io/github/bi0qaw/biosphere/type/FrameType.java
Normal file → Executable file
@ -11,7 +11,6 @@ import ch.njol.yggdrasil.Fields;
|
||||
import io.github.bi0qaw.biosphere.util.Frame;
|
||||
import io.github.bi0qaw.biosphere.util.VectorMath;
|
||||
|
||||
import java.io.NotSerializableException;
|
||||
import java.io.StreamCorruptedException;
|
||||
import java.util.regex.Matcher;
|
||||
import java.util.regex.Pattern;
|
||||
@ -20,15 +19,15 @@ public class FrameType {
|
||||
public FrameType(){}
|
||||
|
||||
static {
|
||||
Classes.registerClass(new ClassInfo<Frame>(Frame.class, "frame")
|
||||
Classes.registerClass(new ClassInfo<>(Frame.class, "frame")
|
||||
.user("frames?")
|
||||
.name("Frame")
|
||||
.description("Reference frame that can be used to get vectors relative to some direction.")
|
||||
.usage(new String[]{"frame of %entity%", "frame with yaw %number% and pitch %number%"})
|
||||
.examples(new String[]{"set {_frame} to frame of player", "set {_circle::*} to circle with radius 1 and density 5",
|
||||
.usage("frame of %entity%", "frame with yaw %number% and pitch %number%")
|
||||
.examples("set {_frame} to frame of player", "set {_circle::*} to circle with radius 1 and density 5",
|
||||
"show happy villager at player's head offset by {_circle::*} in frame of player",
|
||||
"#shows a particle circle around the player's head with the yaw and pitch of the player"})
|
||||
.defaultExpression(new EventValueExpression<Frame>(Frame.class))
|
||||
"#shows a particle circle around the player's head with the yaw and pitch of the player")
|
||||
.defaultExpression(new EventValueExpression<>(Frame.class))
|
||||
.parser(new Parser<Frame>() {
|
||||
|
||||
private final Pattern parsePattern = Pattern.compile("frame:(-?\\d+(\\.\\d+)?),(-?\\d+(\\.\\d+)?)"
|
||||
@ -63,12 +62,6 @@ public class FrameType {
|
||||
float pitch = VectorMath.skriptPitch(f.getPitch());
|
||||
return "frame:" + Skript.toString(yaw) + "," + Skript.toString(pitch);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getVariableNamePattern() {
|
||||
return "frame:(-?\\d+(\\.\\d+)?),(-?\\d+(\\.\\d+)?)";
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getDebugMessage(Frame f) {
|
||||
float yaw = VectorMath.skriptYaw(f.getYaw());
|
||||
@ -78,7 +71,7 @@ public class FrameType {
|
||||
})
|
||||
.serializer(new Serializer<Frame>() {
|
||||
@Override
|
||||
public Fields serialize(Frame f) throws NotSerializableException {
|
||||
public Fields serialize(Frame f) {
|
||||
final Fields fields = new Fields();
|
||||
float yaw = VectorMath.skriptYaw(f.getYaw());
|
||||
float pitch = VectorMath.skriptPitch(f.getPitch());
|
||||
@ -88,12 +81,12 @@ public class FrameType {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void deserialize(Frame f, Fields fields) throws StreamCorruptedException, NotSerializableException {
|
||||
public void deserialize(Frame f, Fields fields) {
|
||||
assert false;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected Frame deserialize(Fields f) throws StreamCorruptedException, NotSerializableException {
|
||||
protected Frame deserialize(Fields f) throws StreamCorruptedException {
|
||||
float yaw = VectorMath.fromSkriptYaw(f.getPrimitive("yaw", float.class));
|
||||
float pitch = VectorMath.fromSkriptPitch(f.getPrimitive("pitch", float.class));
|
||||
return new Frame().setFromYawPitch(yaw, pitch);
|
||||
|
0
src/main/java/io/github/bi0qaw/biosphere/util/Frame.java
Normal file → Executable file
0
src/main/java/io/github/bi0qaw/biosphere/util/Frame.java
Normal file → Executable file
1
src/main/java/io/github/bi0qaw/biosphere/util/LocationLib.java
Normal file → Executable file
1
src/main/java/io/github/bi0qaw/biosphere/util/LocationLib.java
Normal file → Executable file
@ -55,7 +55,6 @@ public class LocationLib {
|
||||
}
|
||||
|
||||
public static Location[] getLineCoordinate(Location[] locations, Location end, double position) {
|
||||
Location[] coordinates = new Location[locations.length];
|
||||
Vector delta;
|
||||
int i = 0;
|
||||
for (Location l: locations) {
|
||||
|
0
src/main/java/io/github/bi0qaw/biosphere/util/VectorLib.java
Normal file → Executable file
0
src/main/java/io/github/bi0qaw/biosphere/util/VectorLib.java
Normal file → Executable file
0
src/main/java/io/github/bi0qaw/biosphere/util/VectorMath.java
Normal file → Executable file
0
src/main/java/io/github/bi0qaw/biosphere/util/VectorMath.java
Normal file → Executable file
6
src/main/resources/plugin.yml
Normal file → Executable file
6
src/main/resources/plugin.yml
Normal file → Executable file
@ -1,4 +1,6 @@
|
||||
name: Biosphere2
|
||||
main: io.github.bi0qaw.biosphere.Biosphere
|
||||
author: bi0qaw
|
||||
version: 1.0.2
|
||||
author: bi0qaw, Govindas
|
||||
version: 1.0.3
|
||||
api-version: 1.13
|
||||
depend: [Skript]
|
BIN
target/biosphere2-1.0.3.jar
Normal file
BIN
target/biosphere2-1.0.3.jar
Normal file
Binary file not shown.
BIN
target/classes/io/github/bi0qaw/biosphere/Biosphere.class
Normal file
BIN
target/classes/io/github/bi0qaw/biosphere/Biosphere.class
Normal file
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user