mirror of
https://github.com/songoda/FabledSkyBlock.git
synced 2024-11-22 18:26:08 +01:00
clone location before passing in method
This commit is contained in:
parent
056ff3dae5
commit
7763516fd3
@ -36,7 +36,7 @@ public final class LocationUtil {
|
||||
public static void removeWaterFromLoc(SkyBlock plugin, Location loc) {
|
||||
if(plugin.getFileManager().getConfig(new File(plugin.getDataFolder(), "config.yml"))
|
||||
.getFileConfiguration().getBoolean("Island.Teleport.RemoveWater", false)){
|
||||
Location tempLoc = LocationUtil.getDefinitiveLocation(loc);
|
||||
Location tempLoc = LocationUtil.getDefinitiveLocation(loc.clone());
|
||||
if(tempLoc.getBlock().getType().equals(Material.WATER)){
|
||||
tempLoc.getBlock().setType(Material.AIR);
|
||||
} else if(ServerVersion.isServerVersionAtLeast(ServerVersion.V1_13)){
|
||||
|
Loading…
Reference in New Issue
Block a user