mirror of
https://github.com/TotalFreedomMC/TF-ProjectKorra.git
synced 2025-02-12 03:59:06 +00:00
Add world checks FireShield
This commit is contained in:
parent
bb9dc95dd7
commit
e9827fd499
1 changed files with 6 additions and 3 deletions
|
@ -186,11 +186,14 @@ public class FireShield {
|
|||
Location playerLoc = fshield.player.getLocation();
|
||||
|
||||
if(fshield.shield) {
|
||||
if (playerLoc.getWorld() != loc.getWorld())
|
||||
return false;
|
||||
if(playerLoc.distance(loc) <= fshield.radius)
|
||||
return true;
|
||||
}
|
||||
else{
|
||||
} else {
|
||||
Location tempLoc = playerLoc.clone().add(playerLoc.multiply(fshield.discradius));
|
||||
if (playerLoc.getWorld() != tempLoc.getWorld())
|
||||
return false;
|
||||
if(tempLoc.distance(loc) <= fshield.discradius)
|
||||
return true;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue