mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2024-12-30 20:48:19 +01:00
Fixed calculating party bonus XP when players are in different
worlds throwing errors.
This commit is contained in:
parent
b0fbaa71bf
commit
6a858dace7
@ -157,7 +157,11 @@ public class m {
|
||||
* @return true if the distance between <code>first</code> and <code>second</code> is less than <code>maxDistance</code>, false otherwise
|
||||
*/
|
||||
public static boolean isNear(Location first, Location second, double maxDistance) {
|
||||
if (first.distance(second) < maxDistance) {
|
||||
if (!first.getWorld().equals(second.getWorld())) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (first.distanceSquared(second) < (maxDistance * maxDistance)) {
|
||||
return true;
|
||||
}
|
||||
else {
|
||||
|
Loading…
Reference in New Issue
Block a user