Improve version compatibility
This commit is contained in:
parent
94028484cf
commit
ac89630f5d
@ -27,9 +27,10 @@ public class LoginLocationFixListener implements Listener{
|
|||||||
Material material = Material.matchMaterial("PORTAL");
|
Material material = Material.matchMaterial("PORTAL");
|
||||||
if (material == null) {
|
if (material == null) {
|
||||||
material = Material.matchMaterial("PORTAL_BLOCK");
|
material = Material.matchMaterial("PORTAL_BLOCK");
|
||||||
} else {
|
if(material == null){
|
||||||
material = Material.matchMaterial("NETHER_PORTAL");
|
material = Material.matchMaterial("NETHER_PORTAL");
|
||||||
}
|
}
|
||||||
|
}
|
||||||
Location JoinLocation = player.getLocation().getBlock().getLocation().add(0.5, 0.1, 0.5);
|
Location JoinLocation = player.getLocation().getBlock().getLocation().add(0.5, 0.1, 0.5);
|
||||||
if (AuthMe.settings.getProperty(SecuritySettings.LOGIN_LOC_FIX_SUB_PORTAL)) {
|
if (AuthMe.settings.getProperty(SecuritySettings.LOGIN_LOC_FIX_SUB_PORTAL)) {
|
||||||
if (!JoinLocation.getBlock().getType().equals(material) && !JoinLocation.getBlock().getRelative(BlockFace.UP).getType().equals(material)) {
|
if (!JoinLocation.getBlock().getType().equals(material) && !JoinLocation.getBlock().getRelative(BlockFace.UP).getType().equals(material)) {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user