SteamWar/MissileWars
Archiviert
13
0

Fix SpaceListener
Alle Prüfungen waren erfolgreich
SteamWarCI Build successful

Dieser Commit ist enthalten in:
yoyosource 2022-12-28 21:35:54 +01:00
Ursprung 857e201ca8
Commit 15c204fe68

Datei anzeigen

@ -23,7 +23,9 @@ package de.steamwar.misslewars.listener.special;
import de.steamwar.misslewars.Config;
import de.steamwar.misslewars.FightState;
import de.steamwar.misslewars.MissileWars;
import de.steamwar.misslewars.listener.BasicListener;
import org.bukkit.Bukkit;
import org.bukkit.entity.Player;
import org.bukkit.entity.TNTPrimed;
import org.bukkit.event.EventHandler;
@ -44,9 +46,11 @@ public class SpaceListener extends BasicListener {
@EventHandler
public void onPlayerJoin(PlayerJoinEvent event) {
if (!Config.Space) return;
Player player = event.getPlayer();
player.addPotionEffect(new PotionEffect(PotionEffectType.JUMP, Integer.MAX_VALUE, 2));
player.addPotionEffect(new PotionEffect(PotionEffectType.SLOW_FALLING, Integer.MAX_VALUE, 2));
Bukkit.getScheduler().runTaskLater(MissileWars.getPlugin(), () -> {
Player player = event.getPlayer();
player.addPotionEffect(new PotionEffect(PotionEffectType.JUMP, Integer.MAX_VALUE, 3));
player.addPotionEffect(new PotionEffect(PotionEffectType.SLOW_FALLING, Integer.MAX_VALUE, 3));
}, 1);
}
@EventHandler