Skip to content

Commit

Permalink
Teleport dragons async on supported versions
Browse files Browse the repository at this point in the history
  • Loading branch information
MetallicGoat committed Jan 11, 2024
1 parent fcc7e96 commit ad89454
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 1 deletion.
Binary file modified libs/public/BedwarsAPI-5.3.3.jar
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,7 @@ public class MainConfig {
@Config(
description = {
"Tries to disable the dragon death sound by overriding the value set in the spigot.yml",
"Disabling this will require a complete server restart (bw reload will not have an effect)"
}
)
public static boolean disable_dragon_death_sound = true;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
import de.marcely.bedwars.api.arena.Team;
import de.marcely.bedwars.api.event.arena.RoundEndEvent;
import de.marcely.bedwars.api.game.spawner.Spawner;
import de.marcely.bedwars.tools.Helper;
import de.marcely.bedwars.tools.location.XYZ;
import de.marcely.bedwars.tools.location.XYZYP;
import me.metallicgoat.tweaksaddon.MBedwarsTweaksPlugin;
Expand Down Expand Up @@ -279,7 +280,9 @@ public void run() {

// Move it move it move it
teleportLocation.setDirection(this.dragon.getLocation().clone().subtract(teleportLocation).toVector());
this.dragon.teleport(teleportLocation);

// Only async on paper 1.14.4+
Helper.get().teleportAsync(this.dragon, teleportLocation, null);
}

private void remove() {
Expand Down

0 comments on commit ad89454

Please sign in to comment.