diff --git a/TwosideKeeper.jar b/TwosideKeeper.jar index 19a3cf4..52006d4 100644 Binary files a/TwosideKeeper.jar and b/TwosideKeeper.jar differ diff --git a/src/plugin.yml b/src/plugin.yml index 1c3b6fc..fb47cb5 100644 --- a/src/plugin.yml +++ b/src/plugin.yml @@ -1,6 +1,6 @@ name: TwosideKeeper main: sig.plugin.TwosideKeeper.TwosideKeeper -version: 3.8.0 +version: 3.8.0r1 commands: money: description: Tells the player the amount of money they are holding. diff --git a/src/sig/plugin/TwosideKeeper/EliteMonster.java b/src/sig/plugin/TwosideKeeper/EliteMonster.java index bb8b1c3..9d63bab 100644 --- a/src/sig/plugin/TwosideKeeper/EliteMonster.java +++ b/src/sig/plugin/TwosideKeeper/EliteMonster.java @@ -63,6 +63,7 @@ public class EliteMonster { boolean enraged=false; boolean storingenergy=false; Location target_leap_loc = null; + Location myspawn = null; HashMap storedblocks = new HashMap(); List targetlist = new ArrayList(); @@ -72,6 +73,7 @@ public class EliteMonster { this.m=m; m.getAttribute(Attribute.GENERIC_MOVEMENT_SPEED).setBaseValue(DEFAULT_MOVE_SPD); this.hp_before_burstcheck=m.getHealth(); + this.myspawn=m.getLocation(); } public void runTick() { @@ -80,6 +82,7 @@ public class EliteMonster { rebuff(); regenerateHealth(); moveFasterToTarget(); + resetToSpawn(); if (m.isValid() && targetlist.size()>0) { weakenTeam(); retargetInAir(); @@ -88,6 +91,12 @@ public class EliteMonster { } } + private void resetToSpawn() { + if (targetlist.size()==0 && m.getLocation().distanceSquared(myspawn)>81) { + m.teleport(myspawn); + } + } + private void dontDrown() { m.setRemainingAir(m.getMaximumAir()); } @@ -179,6 +188,7 @@ public class EliteMonster { m.setTarget(ChooseRandomTarget()); } else { m.setTarget(null); + resetToSpawn(); } } if (!storingenergy) { @@ -205,6 +215,7 @@ public class EliteMonster { m.setVelocity((m.getLocation().getDirection()).add(new Vector(0,0.2*(l.getLocation().getY()-m.getLocation().getY()),0))); } } else { + targetlist.remove(l); m.setTarget(null); } } @@ -342,7 +353,7 @@ public class EliteMonster { for (int x=-radius;x