File tree Expand file tree Collapse file tree
src/main/kotlin/dev/lumas/jobsaddons Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -29,6 +29,12 @@ class PerksFile : OkaeriConfig() {
2929 " Whimsical"
3030 )
3131
32+ var disabledPotionEffectsWorlds = listOf (
33+ " event_new" ,
34+ " sandbox" ,
35+ " build_void"
36+ )
37+
3238 // this is tedious as fuck
3339 var perks: List <JobPerkCluster > = buildList {
3440
Original file line number Diff line number Diff line change @@ -142,8 +142,14 @@ object PerksCommandUtil {
142142
143143 fun potionEffectRunnable () {
144144 Bukkit .getScheduler().scheduleSyncRepeatingTask(JobsAddons .INSTANCE , {
145- val players = List .copyOf(Bukkit .getOnlinePlayers())
146- for (player in players) {
145+ for (player in Bukkit .getOnlinePlayers()) {
146+
147+ if (JobsAddons .PERKS .disabledPotionEffectsWorlds.contains(player.world.name)) {
148+ continue
149+ }
150+
151+
152+ // TODO rewrite this bs
147153 if (player.scoreboardTags.contains(" pot.absorption" )) {
148154 potEffect(player, PotionEffectType .ABSORPTION )
149155 }
You can’t perform that action at this time.
0 commit comments