How to close falldamage in skywars i want it because player in skywars fall out with glass base and get damage
PHP: public function onFallDamage(EntityDamageEvent $ev) { if($ev->getPlayer()->getLevel()->getName() == "skywars") { if($ev->getCause() == EntityDamageEvent::CAUSE_FALL) { $ev->setCancelled(); } }} If I'm correct
PHP: public $time;public function onGameStart() { $this->time = time();}public function onFallDamage(EntityDamageEvent $ev) { if($ev->getPlayer()->getLevel()->getName() == "skywars") { if($ev->getCause() == EntityDamageEvent::CAUSE_FALL) { if((time() - $this->time) < 15) { $ev->setCancelled(); } } }} Maybe this will work, not really sure.
Create an array, put a player in the array when they join the match. When the match starts, schedule a delayed task that removes the player from the array. On the handler hand, cancel fall event if the player is in the array.
You don't have to put every player in an array, as the game starts at the same moment for every player in that world
In that case, you won't need the array. Who said it can't be a multi-world SkyWars minigame? There are too many variables to consider. I believe he/she can figure it out just by using their brain
I think this should not work, not 100% sure. It will never work if you don't try to understand every single token in the code. If you don't want to try to understand it, go request a plugin instead.