From b71a5e79e990ff3dd70be83df99e04ee2cc968d7 Mon Sep 17 00:00:00 2001 From: Fabrizio La Rosa Date: Sun, 12 Jul 2020 17:30:14 +0200 Subject: [PATCH] Simplify code --- src/main/java/com/songoda/skyblock/listeners/Teleport.java | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/main/java/com/songoda/skyblock/listeners/Teleport.java b/src/main/java/com/songoda/skyblock/listeners/Teleport.java index 251c104c..a7d5a5df 100644 --- a/src/main/java/com/songoda/skyblock/listeners/Teleport.java +++ b/src/main/java/com/songoda/skyblock/listeners/Teleport.java @@ -55,8 +55,7 @@ public class Teleport implements Listener { Config config = fileManager.getConfig(new File(plugin.getDataFolder(), "language.yml")); FileConfiguration configLoad = config.getFileConfiguration(); - if(worldManager.isIslandWorld(event.getFrom().getWorld()) - || (event.getTo() != null && worldManager.isIslandWorld(event.getTo().getWorld()))) { + if(worldManager.isIslandWorld(event.getFrom().getWorld()) || worldManager.isIslandWorld(event.getTo().getWorld())) { Bukkit.getScheduler().runTaskLater(plugin, () -> islandManager.updateFlight(player), 1L); } islandManager.loadPlayer(player);