moved location getter to runnable

This commit is contained in:
Bryson Steck 2021-06-15 20:34:03 -06:00
parent 8d8371290e
commit 8b87049d4d
3 changed files with 1 additions and 1 deletions

View file

@ -49,10 +49,10 @@ public class PlayerListener implements Listener {
public void onPlayerRespawn(PlayerRespawnEvent e) { public void onPlayerRespawn(PlayerRespawnEvent e) {
final Player p = e.getPlayer(); final Player p = e.getPlayer();
p.setGameMode(GameMode.SPECTATOR); p.setGameMode(GameMode.SPECTATOR);
this.spawn = p.getLocation();
new BukkitRunnable() { new BukkitRunnable() {
@Override @Override
public void run() { public void run() {
spawn = p.getLocation();
// PotionEffect invisibility = new PotionEffect(PotionEffectType.INVISIBILITY, 1728000, 10, false); // PotionEffect invisibility = new PotionEffect(PotionEffectType.INVISIBILITY, 1728000, 10, false);
PotionEffect blindness = new PotionEffect(PotionEffectType.BLINDNESS, 1728000, 10, false); PotionEffect blindness = new PotionEffect(PotionEffectType.BLINDNESS, 1728000, 10, false);
PotionEffect slowness = new PotionEffect(PotionEffectType.SLOW, 1728000, 10, false); PotionEffect slowness = new PotionEffect(PotionEffectType.SLOW, 1728000, 10, false);