Skip to content

Commit

Permalink
Add op check to deny perm check.
Browse files Browse the repository at this point in the history
  • Loading branch information
creatorfromhell committed Feb 18, 2024
1 parent c1567fc commit 7e4cc5e
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 5 deletions.
1 change: 0 additions & 1 deletion src/main/java/me/lokka30/phantomworlds/PhantomWorlds.java
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@
import org.bukkit.World;
import org.bukkit.WorldType;
import org.bukkit.plugin.java.JavaPlugin;
import org.bukkit.potion.PotionEffectType;
import org.bukkit.scheduler.BukkitTask;

import java.io.File;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ public void onChangeWorld(PlayerChangedWorldEvent event) {
}

if(PhantomWorlds.instance().getConfig().contains(cfgPath + ".effects") &&
PhantomWorlds.instance().getConfig().isConfigurationSection(cfgPath + ".effects")) {
PhantomWorlds.instance().getConfig().isConfigurationSection(cfgPath + ".effects") && !event.getPlayer().hasPermission("phantomworlds.world.bypass.effects")) {

for(final String effName : PhantomWorlds.instance().getConfig().getConfigurationSection(cfgPath + ".effects").getKeys(false)) {
final int duration = PhantomWorlds.instance().getConfig().getInt(cfgPath + ".effects." + effName, 60);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ public void onPortal(PlayerTeleportEvent event) {
return;
}

if(event.getPlayer().hasPermission("phantomworlds.world.deny." + event.getTo().getWorld().getName())) {
if(!event.getPlayer().isOp() && event.getPlayer().hasPermission("phantomworlds.world.deny." + event.getTo().getWorld().getName())) {
event.setCancelled(true);
}
}
Expand Down
4 changes: 2 additions & 2 deletions src/main/resources/plugin.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
# / / | `.__/| / | \__/ `._.' / ' / |,' \,' `._.' / /\__ `___,' \___.'

name: 'PhantomWorlds'
version: '${project.version}'
description: '${project.description}'
version: '2.05'
description: 'The Robust World Manager for Minecraft Servers'
authors: [ 'creatorfromhell', 'lokka30' ]
website: 'https://github.com/lokka30/PhantomWorlds'

Expand Down

0 comments on commit 7e4cc5e

Please sign in to comment.