Fix false positive with horse and jump boost, added "max-setback-distance".

This commit is contained in:
Rammelkast committed 2020-07-29 14:06:49 +02:00
1 parent 9850f48a4e
commit 07f957cf35
8 files changed
+31 -27

No files matched your search

@@ -217,7 +217,8 @@ public class User {
* @return last known valid location
*/
public Location getGoodLocation(Location location) {
if (goodLocation == null) {
if (goodLocation == null || !location.getWorld().equals(goodLocation.getWorld())
|| location.distance(goodLocation) > config.getConfig().maxSetbackDistance.getValue()) {
return location;
}