Dieser Commit ist enthalten in:
Ursprung
00e1e929ee
Commit
857e201ca8
@ -28,6 +28,9 @@ import org.bukkit.entity.Player;
|
|||||||
import org.bukkit.entity.TNTPrimed;
|
import org.bukkit.entity.TNTPrimed;
|
||||||
import org.bukkit.event.EventHandler;
|
import org.bukkit.event.EventHandler;
|
||||||
import org.bukkit.event.entity.EntitySpawnEvent;
|
import org.bukkit.event.entity.EntitySpawnEvent;
|
||||||
|
import org.bukkit.event.player.PlayerJoinEvent;
|
||||||
|
import org.bukkit.potion.PotionEffect;
|
||||||
|
import org.bukkit.potion.PotionEffectType;
|
||||||
import org.bukkit.util.Vector;
|
import org.bukkit.util.Vector;
|
||||||
|
|
||||||
import java.util.EnumSet;
|
import java.util.EnumSet;
|
||||||
@ -38,6 +41,14 @@ public class SpaceListener extends BasicListener {
|
|||||||
super(EnumSet.allOf(FightState.class));
|
super(EnumSet.allOf(FightState.class));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@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));
|
||||||
|
}
|
||||||
|
|
||||||
@EventHandler
|
@EventHandler
|
||||||
public void onEntitySpawn(EntitySpawnEvent event) {
|
public void onEntitySpawn(EntitySpawnEvent event) {
|
||||||
if (!Config.Space) return;
|
if (!Config.Space) return;
|
||||||
|
In neuem Issue referenzieren
Einen Benutzer sperren