mirror of
https://github.com/darverdevs/BossBarAPI.git
synced 2024-12-21 23:04:11 -08:00
commit
683a57af8f
10
.idea/runConfigurations.xml
Normal file
10
.idea/runConfigurations.xml
Normal file
|
@ -0,0 +1,10 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<project version="4">
|
||||||
|
<component name="RunConfigurationProducerService">
|
||||||
|
<option name="ignoredProducers">
|
||||||
|
<set>
|
||||||
|
<option value="com.android.tools.idea.compose.preview.runconfiguration.ComposePreviewRunConfigurationProducer" />
|
||||||
|
</set>
|
||||||
|
</option>
|
||||||
|
</component>
|
||||||
|
</project>
|
|
@ -1,81 +1,81 @@
|
||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
|
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
|
||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
<groupId>tech.nully</groupId>
|
<groupId>tech.nully</groupId>
|
||||||
<artifactId>BossBarAPI</artifactId>
|
<artifactId>BossBarAPI</artifactId>
|
||||||
<version>0.0.1</version>
|
<version>0.0.1</version>
|
||||||
<build>
|
<build>
|
||||||
<plugins>
|
<plugins>
|
||||||
<plugin>
|
<plugin>
|
||||||
<artifactId>maven-compiler-plugin</artifactId>
|
<artifactId>maven-compiler-plugin</artifactId>
|
||||||
<version>3.8.0</version>
|
<version>3.8.0</version>
|
||||||
<configuration>
|
<configuration>
|
||||||
<source>1.8</source>
|
<source>1.8</source>
|
||||||
<target>1.8</target>
|
<target>1.8</target>
|
||||||
</configuration>
|
</configuration>
|
||||||
</plugin>
|
</plugin>
|
||||||
<plugin>
|
<plugin>
|
||||||
<artifactId>maven-jar-plugin</artifactId>
|
<artifactId>maven-jar-plugin</artifactId>
|
||||||
<configuration>
|
<configuration>
|
||||||
<archive>
|
<archive>
|
||||||
<manifestEntries>
|
<manifestEntries>
|
||||||
<Built-By />
|
<Built-By />
|
||||||
</manifestEntries>
|
</manifestEntries>
|
||||||
</archive>
|
</archive>
|
||||||
</configuration>
|
</configuration>
|
||||||
</plugin>
|
</plugin>
|
||||||
<plugin>
|
<plugin>
|
||||||
<artifactId>maven-shade-plugin</artifactId>
|
<artifactId>maven-shade-plugin</artifactId>
|
||||||
<version>3.2.4</version>
|
<version>3.2.4</version>
|
||||||
<executions>
|
<executions>
|
||||||
<execution>
|
<execution>
|
||||||
<phase>package</phase>
|
<phase>package</phase>
|
||||||
<goals>
|
<goals>
|
||||||
<goal>shade</goal>
|
<goal>shade</goal>
|
||||||
</goals>
|
</goals>
|
||||||
</execution>
|
</execution>
|
||||||
</executions>
|
</executions>
|
||||||
<configuration>
|
<configuration>
|
||||||
<generateUniqueDependencyReducedPom>false</generateUniqueDependencyReducedPom>
|
<generateUniqueDependencyReducedPom>false</generateUniqueDependencyReducedPom>
|
||||||
<filters>
|
<filters>
|
||||||
<filter>
|
<filter>
|
||||||
<artifact>*:*</artifact>
|
<artifact>*:*</artifact>
|
||||||
<excludes>
|
<excludes>
|
||||||
<exclude>META-INF/*.SF</exclude>
|
<exclude>META-INF/*.SF</exclude>
|
||||||
<exclude>META-INF/*.DSA</exclude>
|
<exclude>META-INF/*.DSA</exclude>
|
||||||
<exclude>META-INF/*.RSA</exclude>
|
<exclude>META-INF/*.RSA</exclude>
|
||||||
</excludes>
|
</excludes>
|
||||||
</filter>
|
</filter>
|
||||||
</filters>
|
</filters>
|
||||||
<minimizeJar>true</minimizeJar>
|
<minimizeJar>true</minimizeJar>
|
||||||
</configuration>
|
</configuration>
|
||||||
</plugin>
|
</plugin>
|
||||||
</plugins>
|
</plugins>
|
||||||
</build>
|
</build>
|
||||||
<repositories>
|
<repositories>
|
||||||
<repository>
|
<repository>
|
||||||
<id>EaglerMaven-Repo</id>
|
<id>EaglerMaven-Repo</id>
|
||||||
<url>https://github.com/darverdevs/EaglerMavenRepo/raw/main</url>
|
<url>https://github.com/darverdevs/EaglerMavenRepo/raw/main</url>
|
||||||
</repository>
|
</repository>
|
||||||
</repositories>
|
</repositories>
|
||||||
<dependencies>
|
<dependencies>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>com.github.EaglerMaven</groupId>
|
<groupId>com.github.EaglerMaven</groupId>
|
||||||
<artifactId>ProtocolLib</artifactId>
|
<artifactId>ProtocolLib</artifactId>
|
||||||
<version>3.6.4</version>
|
<version>3.6.4</version>
|
||||||
<scope>provided</scope>
|
<scope>provided</scope>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>com.github.EaglerMaven</groupId>
|
<groupId>com.github.EaglerMaven</groupId>
|
||||||
<artifactId>craftbukkit</artifactId>
|
<artifactId>craftbukkit</artifactId>
|
||||||
<version>1.5.2-R1.0</version>
|
<version>1.5.2-R1.0</version>
|
||||||
<scope>provided</scope>
|
<scope>provided</scope>
|
||||||
</dependency>
|
</dependency>
|
||||||
</dependencies>
|
</dependencies>
|
||||||
<properties>
|
<properties>
|
||||||
<maven.compiler.target>1.8</maven.compiler.target>
|
<java.version>1.8</java.version>
|
||||||
<java.version>1.8</java.version>
|
<maven.compiler.source>1.8</maven.compiler.source>
|
||||||
<maven.compiler.source>1.8</maven.compiler.source>
|
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
<maven.compiler.target>1.8</maven.compiler.target>
|
||||||
</properties>
|
</properties>
|
||||||
</project>
|
</project>
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
package tech.nully.BossBarAPI;
|
package tech.nully.BossBarAPI;
|
||||||
|
|
||||||
import com.comphenix.protocol.ProtocolLibrary;
|
import com.comphenix.protocol.ProtocolLibrary;
|
||||||
|
import org.bukkit.Bukkit;
|
||||||
import org.bukkit.Location;
|
import org.bukkit.Location;
|
||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
|
|
||||||
|
@ -20,6 +21,8 @@ public class BossBar {
|
||||||
return bossHealth;
|
return bossHealth;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private TeleportScheduler t;
|
||||||
|
|
||||||
public void setHealth(int bossHealth) {
|
public void setHealth(int bossHealth) {
|
||||||
this.bossHealth = bossHealth;
|
this.bossHealth = bossHealth;
|
||||||
if (dragon != null) {
|
if (dragon != null) {
|
||||||
|
@ -48,17 +51,20 @@ public class BossBar {
|
||||||
dragon.destroy();
|
dragon.destroy();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
dragon = new SpawnFakeWither.FakeWither(
|
dragon = new SpawnFakeWither.FakeWither(p, ProtocolLibrary.getProtocolManager());
|
||||||
new Location(p.getWorld(), p.getLocation().getX(), -15, p.getLocation().getZ()), ProtocolLibrary.getProtocolManager());
|
|
||||||
dragon.setCustomName(text);
|
dragon.setCustomName(text);
|
||||||
dragon.setVisible(false);
|
dragon.setVisible(false);
|
||||||
dragon.create();
|
dragon.create();
|
||||||
|
|
||||||
|
t = new TeleportScheduler(this);
|
||||||
|
Bukkit.getScheduler().scheduleSyncDelayedTask(Main.getInstance(), t, 100);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void delete() {
|
public void delete() {
|
||||||
if (dragon != null) {
|
if (dragon != null) {
|
||||||
if (dragon.created) {
|
if (dragon.created) {
|
||||||
dragon.destroy();
|
dragon.destroy();
|
||||||
|
t.cancel();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
16
src/main/java/tech/nully/BossBarAPI/TeleportScheduler.java
Normal file
16
src/main/java/tech/nully/BossBarAPI/TeleportScheduler.java
Normal file
|
@ -0,0 +1,16 @@
|
||||||
|
package tech.nully.BossBarAPI;
|
||||||
|
|
||||||
|
import org.bukkit.scheduler.BukkitRunnable;
|
||||||
|
|
||||||
|
public class TeleportScheduler extends BukkitRunnable {
|
||||||
|
private BossBar b;
|
||||||
|
|
||||||
|
public TeleportScheduler(BossBar b) {
|
||||||
|
this.b = b;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void run() {
|
||||||
|
b.display();
|
||||||
|
}
|
||||||
|
}
|
Binary file not shown.
BIN
target/BossBarAPI-0.0.1.jar
Normal file
BIN
target/BossBarAPI-0.0.1.jar
Normal file
Binary file not shown.
|
@ -1,3 +1,7 @@
|
||||||
tech\nully\BossBarAPI\FakeWitherCommand$1.class
|
tech/nully/BossBarAPI/BossBar.class
|
||||||
tech\nully\BossBarAPI\BossBar.class
|
tech/nully/BossBarAPI/Main.class
|
||||||
tech\nully\BossBarAPI\FakeWitherCommand.class
|
tech/nully/BossBarAPI/FakeWitherCommand$1.class
|
||||||
|
tech/nully/BossBarAPI/SpawnFakeWither.class
|
||||||
|
tech/nully/BossBarAPI/TeleportScheduler.class
|
||||||
|
tech/nully/BossBarAPI/FakeWitherCommand.class
|
||||||
|
tech/nully/BossBarAPI/SpawnFakeWither$FakeWither.class
|
||||||
|
|
BIN
target/original-BossBarAPI-0.0.1.jar
Normal file
BIN
target/original-BossBarAPI-0.0.1.jar
Normal file
Binary file not shown.
Loading…
Reference in New Issue
Block a user