mirror of
https://github.com/songoda/FabledSkyBlock.git
synced 2024-11-20 09:15:29 +01:00
Fixed issue with portals mainly from the nether to the end.
This commit is contained in:
parent
c61e14c0c3
commit
3f0f93ef12
@ -46,9 +46,10 @@ public class MoveListeners implements Listener {
|
||||
Location from = event.getFrom();
|
||||
Location to = event.getTo();
|
||||
|
||||
if (from.getBlockX() == to.getBlockX() && from.getBlockY() == to.getBlockY() && from.getBlockZ() == to.getBlockZ()) {
|
||||
if (from.getBlockX() == to.getBlockX()
|
||||
&& from.getBlockY() == to.getBlockY()
|
||||
&& from.getBlockZ() == to.getBlockZ())
|
||||
return;
|
||||
}
|
||||
|
||||
PlayerDataManager playerDataManager = plugin.getPlayerDataManager();
|
||||
MessageManager messageManager = plugin.getMessageManager();
|
||||
@ -56,7 +57,6 @@ public class MoveListeners implements Listener {
|
||||
PermissionManager permissionManager = plugin.getPermissionManager();
|
||||
SoundManager soundManager = plugin.getSoundManager();
|
||||
WorldManager worldManager = plugin.getWorldManager();
|
||||
FileManager fileManager = plugin.getFileManager();
|
||||
|
||||
if (!worldManager.isIslandWorld(player.getWorld())) return;
|
||||
|
||||
|
@ -124,9 +124,9 @@ public class PortalListeners implements Listener {
|
||||
IslandWorld toWorld = IslandWorld.Normal;
|
||||
|
||||
if (block.getType().equals(CompatibleMaterial.NETHER_PORTAL.getMaterial())) {
|
||||
toWorld = fromWorld.equals(IslandWorld.Normal) ? IslandWorld.Nether : IslandWorld.Normal;
|
||||
toWorld = fromWorld.equals(IslandWorld.Nether) ? IslandWorld.Normal : IslandWorld.Nether;
|
||||
} else if (block.getType().equals(CompatibleMaterial.END_PORTAL.getMaterial())) {
|
||||
toWorld = fromWorld.equals(IslandWorld.Normal) ? IslandWorld.End : IslandWorld.Normal;
|
||||
toWorld = fromWorld.equals(IslandWorld.End) ? IslandWorld.Normal : IslandWorld.End;
|
||||
}
|
||||
|
||||
if(!perms){
|
||||
|
Loading…
Reference in New Issue
Block a user