Merge branch 'master' of ssh://dev.mineplex.com:7999/min/Mineplex
This commit is contained in:
commit
0ba8349e03
@ -516,18 +516,20 @@ public class UtilEnt
|
||||
}
|
||||
}
|
||||
|
||||
public static void CreatureMoveFast(Entity ent, Location target, float speed)
|
||||
public static boolean CreatureMoveFast(Entity ent, Location target, float speed)
|
||||
{
|
||||
if (!(ent instanceof Creature))
|
||||
return;
|
||||
return false;
|
||||
|
||||
if (UtilMath.offset(ent.getLocation(), target) < 0.1)
|
||||
return;
|
||||
return false;
|
||||
|
||||
if (UtilMath.offset(ent.getLocation(), target) < 2)
|
||||
speed = Math.min(speed, 1f);
|
||||
|
||||
EntityCreature ec = ((CraftCreature)ent).getHandle();
|
||||
ec.getControllerMove().a(target.getX(), target.getY(), target.getZ(), speed);
|
||||
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
@ -37,6 +37,7 @@ import org.bukkit.event.block.BlockPlaceEvent;
|
||||
import org.bukkit.event.block.BlockSpreadEvent;
|
||||
import org.bukkit.event.block.LeavesDecayEvent;
|
||||
import org.bukkit.event.entity.EntityExplodeEvent;
|
||||
import org.bukkit.event.entity.EntityTargetEvent;
|
||||
import org.bukkit.event.player.PlayerDropItemEvent;
|
||||
import org.bukkit.event.player.PlayerPickupItemEvent;
|
||||
|
||||
@ -272,4 +273,13 @@ public class WorldManager extends MiniPlugin
|
||||
{
|
||||
event.setCancelled(true);
|
||||
}
|
||||
|
||||
@EventHandler
|
||||
public void CreatureTarget(EntityTargetEvent event)
|
||||
{
|
||||
if (Manager.Mode.equals("Christmas"))
|
||||
{
|
||||
event.setCancelled(true);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user