Add an isGrounded check to FloorIsLava tracker

This commit is contained in:
Sam 2017-11-12 11:50:02 +00:00 committed by Alexander Meech
parent 08a06a2835
commit 6ce701bf03

View File

@ -11,6 +11,7 @@ import org.bukkit.block.BlockFace;
import org.bukkit.entity.Player;
import org.bukkit.event.EventHandler;
import mineplex.core.common.util.UtilEnt;
import mineplex.core.common.util.UtilTime;
import mineplex.core.updater.UpdateType;
import mineplex.core.updater.event.UpdateEvent;
@ -69,7 +70,7 @@ public class FloorIsLavaTracker extends StatTracker<CakeWars>
Block block = location.getBlock();
Set<Block> blocks = getGame().getCakePlayerModule().getPlacedBlocks();
return !blocks.contains(block) && !blocks.contains(block.getRelative(BlockFace.DOWN)) && !getGame().getCakeShopModule().isNearShop(location);
return !blocks.contains(block) && !blocks.contains(block.getRelative(BlockFace.DOWN)) && UtilEnt.isGrounded(player) && !getGame().getCakeShopModule().isNearShop(location);
});
}
}