mirror of
https://github.com/TotalFreedomMC/TF-EssentialsX.git
synced 2025-01-03 22:08:28 +00:00
Fix barrier considered as unsafe block to teleport (#4348)
Co-authored-by: Josh Roy <10731363+JRoy@users.noreply.github.com>
This commit is contained in:
parent
aaddb2af1f
commit
e95df57642
1 changed files with 6 additions and 3 deletions
|
@ -12,7 +12,7 @@ import org.bukkit.inventory.ItemStack;
|
|||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Comparator;
|
||||
import java.util.HashSet;
|
||||
import java.util.EnumSet;
|
||||
import java.util.List;
|
||||
import java.util.Set;
|
||||
|
||||
|
@ -31,8 +31,8 @@ public final class LocationUtil {
|
|||
"FLOWING_LAVA", "LAVA", "STATIONARY_LAVA");
|
||||
private static final Material PORTAL = EnumUtil.getMaterial("NETHER_PORTAL", "PORTAL");
|
||||
// The player can stand inside these materials
|
||||
private static final Set<Material> HOLLOW_MATERIALS = new HashSet<>();
|
||||
private static final Set<Material> TRANSPARENT_MATERIALS = new HashSet<>();
|
||||
private static final Set<Material> HOLLOW_MATERIALS = EnumSet.noneOf(Material.class);
|
||||
private static final Set<Material> TRANSPARENT_MATERIALS = EnumSet.noneOf(Material.class);
|
||||
|
||||
static {
|
||||
// Materials from Material.isTransparent()
|
||||
|
@ -44,6 +44,9 @@ public final class LocationUtil {
|
|||
|
||||
TRANSPARENT_MATERIALS.addAll(HOLLOW_MATERIALS);
|
||||
TRANSPARENT_MATERIALS.addAll(WATER_TYPES);
|
||||
|
||||
// Barrier is transparent, but solid
|
||||
HOLLOW_MATERIALS.remove(Material.BARRIER);
|
||||
}
|
||||
|
||||
static {
|
||||
|
|
Loading…
Reference in a new issue