Skip to content

Commit

Permalink
Extra logging of precision dragon removal; extra location tolerance.
Browse files Browse the repository at this point in the history
  • Loading branch information
totemo committed May 7, 2020
1 parent a369bc1 commit 54e0a5e
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/main/java/nu/nerd/df/DragonUtil.java
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
import org.bukkit.entity.Entity;

import nu.nerd.beastmaster.BeastMaster;
import nu.nerd.beastmaster.Util;
import nu.nerd.beastmaster.mobs.MobType;

// --------------------------------------------------------------------------
Expand Down Expand Up @@ -54,8 +55,11 @@ public static boolean isFightWorld(World world) {
*/
public static void removeDragon(EnderDragon dragon) {
Location loc = dragon.getLocation();
FightState.log("Remove dragon: " + dragon.getUniqueId() +
" at " + Util.formatLocation(dragon.getLocation()));

String command = String.format("execute in minecraft:the_end run " +
"kill @e[type=minecraft:ender_dragon,x=%.2f,y=%.2f,z=%.2f,distance=..0.05,limit=1]",
"kill @e[type=minecraft:ender_dragon,x=%.2f,y=%.2f,z=%.2f,distance=..0.5,limit=1]",
loc.getX(), loc.getY(), loc.getZ());
Bukkit.getServer().dispatchCommand(Bukkit.getConsoleSender(), command);
}
Expand Down

0 comments on commit 54e0a5e

Please sign in to comment.