The most lag is created by player entities, Minecraft PE lags when there are about 20 player entities in your nearby area. Could I reduce lag when I would do $player->hide($player); (not sure how it was called), when a player is not in the visible area of another player (could I use getViewers() for that?), I could check it on PlayerMoveEvent or by a task, would it reduce lag?
i have same problem (but im using nukkit) in my bedwars minigame, lags appear after +/- 10 minutes. And they are horrible for some players. And it is not caused by dropped items or by huge map because BEdWars maps are small and there are only few blocks
I also have a BedWars plugin and I know the world type But why does it lag hmm there arent that much players in BW (compared to an LBSG lobby).
You will most likely get either server lag or delayed player visibility if you try to hide players who are blocked by walls. Also, you won't see the nametag, so that's perhaps bad. (You can hide behind the wall shooting arrows forever!)