Question Problem with Paper

DeadFinder

New member
Aug 8, 2022
1
0
1
Hi! So i have some problem, for first i have a plugin what freezes player when player in snowy biome and not have equipped leather armor, this works like at one tick gets all players in "for" cycle and if player in snowy biome thats do pl.setFreezeTicks(pl.getFreezeTicks() + 40);, so, on test local server all works good and freeze not instant, this adds normally freeze, but for some reasons what i'm not know, this plugin on production server instantly freezes player when he joins to snowy biome (not freezes if player in leather armor).
I have tried download production server and run on downloaded server, but to no avail this not works normally like on test server, any suggestions? I have tried to disable all plugins, change all configs to default configs, not helps..
Code if you want:
(If you can suggest how to make that better - please i'm open for suggestions)
 
Version Output
git-Paper-265 (MC: 1.18.2)

Tacklezaza

New member
Aug 14, 2022
15
0
1
Do you still need help. This thread is quiet old with no-one reply. You should clean up your code, and move to somewhere else, of make method that easy to understand. You code being like

Code:
for(Player player : xxxx){
  if(player.biome == snow)
    if(xxxxx){
        if(yyyy){
            for(String campFire : campfires){
                if(nearBy){
                    for(Player player){
                        //That called "Callback hell"
                    }
                }
            }
        }
    }
}

Callback hell that make your code hard to debug. I didn't test or run or look into your code yet. since it's very hard to understand what going on.
practice more coding and you will find the way to make your code better and cleaner

If you still need help. Please reply the thread