So I have a poisonous air class I made for my custom dimension that causes any player that isn't wearing a gas mask to get poisoned, but the poison is slightly randomized, in that the player may suffer the effects more slowly or more rapidly at any moment. Also if they are wearing the gas mask, the poison doesn't affect them, but the gas mask slowly breaks at a randomized rate. It all works very well for me. On singleplayer, there are no issues. When I start the server, there are no issues. When someone tries to join the server, the server kinda kicks them out. My poison air code looks like this:
I don't know what part of this code is causing the problems, so if someone could help me track down where and why the problems arise, I'd be very grateful.