Fixed 3 false positives in water, one with beds and returned to old "getGoodLocation"

This commit is contained in:
Rammelkast committed 2020-07-21 13:19:35 +02:00
1 parent 168c25e5d2
commit 6966582e4c
8 files changed
+42 -14

No files matched your search

@@ -26,7 +26,6 @@ import java.util.UUID;
import org.bukkit.Bukkit;
import org.bukkit.Location;
import org.bukkit.Material;
import org.bukkit.entity.Player;
import org.bukkit.inventory.Inventory;
import org.bukkit.inventory.ItemStack;
@@ -237,9 +236,7 @@ public class User {
* @return true if the location was valid and set properly
*/
public boolean setGoodLocation(Location location) {
if (Utilities.cantStandAtExp(location)
|| (location.getBlock().isLiquid() && !Utilities.isFullyInWater(location))
|| (!location.getBlock().getType().isSolid() && location.getBlock().getType() != Material.AIR)) {
if (Utilities.cantStandAtExp(location)) {
return false;
}