Improve version compatibility

This commit is contained in:
HaHaWTH 2023-10-14 19:24:12 +08:00
parent 94028484cf
commit ac89630f5d

View File

@ -27,9 +27,10 @@ public class LoginLocationFixListener implements Listener{
Material material = Material.matchMaterial("PORTAL");
if (material == null) {
material = Material.matchMaterial("PORTAL_BLOCK");
} else {
if(material == null){
material = Material.matchMaterial("NETHER_PORTAL");
}
}
Location JoinLocation = player.getLocation().getBlock().getLocation().add(0.5, 0.1, 0.5);
if (AuthMe.settings.getProperty(SecuritySettings.LOGIN_LOC_FIX_SUB_PORTAL)) {
if (!JoinLocation.getBlock().getType().equals(material) && !JoinLocation.getBlock().getRelative(BlockFace.UP).getType().equals(material)) {