Skip to content

Commit

Permalink
Optimize imports.
Browse files Browse the repository at this point in the history
  • Loading branch information
creatorfromhell committed Dec 12, 2023
1 parent dacdad0 commit 736a95b
Showing 1 changed file with 2 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@
import me.lokka30.phantomworlds.PhantomWorlds;
import org.bukkit.event.EventHandler;
import org.bukkit.event.Listener;
import org.bukkit.event.player.PlayerPortalEvent;
import org.bukkit.event.player.PlayerTeleportEvent;

/**
Expand Down Expand Up @@ -50,12 +49,12 @@ public void onPortal(PlayerTeleportEvent event) {
final String cfgPath = "worlds-to-load." + event.getTo().getWorld().getName();

if(PhantomWorlds.instance().data.getConfig().getBoolean(cfgPath + ".whitelist", false)
&& !event.getPlayer().hasPermission("phantomworlds.world.access." + event.getPlayer().getWorld())) {
&& !event.getPlayer().hasPermission("phantomworlds.world.access." + event.getTo().getWorld().getName())) {
event.setCancelled(true);
return;
}

if(event.getPlayer().hasPermission("phantomworlds.world.deny." + event.getPlayer().getWorld())) {
if(event.getPlayer().hasPermission("phantomworlds.world.deny." + event.getTo().getWorld().getName())) {
event.setCancelled(true);
}
}
Expand Down

0 comments on commit 736a95b

Please sign in to comment.