diff options
author | Bryson Steck <steck.bryson@gmail.com> | 2021-06-06 18:41:45 -0600 |
---|---|---|
committer | Bryson Steck <steck.bryson@gmail.com> | 2021-06-06 18:41:45 -0600 |
commit | 18704e791799ea6763de7d36e682702365c38b23 (patch) | |
tree | 6572aac64bc92bdcdd5b21ec28b7a65a2fb78a7e | |
parent | 032d0d72adb4786784438f56684d352c4f2a0d12 (diff) | |
download | resurrection-18704e791799ea6763de7d36e682702365c38b23.tar resurrection-18704e791799ea6763de7d36e682702365c38b23.tar.gz resurrection-18704e791799ea6763de7d36e682702365c38b23.tar.bz2 |
trying shortening ticks
-rw-r--r-- | out/artifacts/Resurrection_jar/Resurrection.jar | bin | 1336669 -> 1335783 bytes | |||
-rw-r--r-- | out/production/Resurrection/net/brysonsteck/Resurrection/PlayerListener.class | bin | 3236 -> 3034 bytes | |||
-rw-r--r-- | src/net/brysonsteck/Resurrection/PlayerListener.java | 21 |
3 files changed, 6 insertions, 15 deletions
diff --git a/out/artifacts/Resurrection_jar/Resurrection.jar b/out/artifacts/Resurrection_jar/Resurrection.jar Binary files differindex c568e5d..3130906 100644 --- a/out/artifacts/Resurrection_jar/Resurrection.jar +++ b/out/artifacts/Resurrection_jar/Resurrection.jar diff --git a/out/production/Resurrection/net/brysonsteck/Resurrection/PlayerListener.class b/out/production/Resurrection/net/brysonsteck/Resurrection/PlayerListener.class Binary files differindex b1e7cfa..5d42741 100644 --- a/out/production/Resurrection/net/brysonsteck/Resurrection/PlayerListener.class +++ b/out/production/Resurrection/net/brysonsteck/Resurrection/PlayerListener.class diff --git a/src/net/brysonsteck/Resurrection/PlayerListener.java b/src/net/brysonsteck/Resurrection/PlayerListener.java index f87f257..0aa1bdd 100644 --- a/src/net/brysonsteck/Resurrection/PlayerListener.java +++ b/src/net/brysonsteck/Resurrection/PlayerListener.java @@ -1,6 +1,5 @@ package net.brysonsteck.Resurrection; -import org.bukkit.Bukkit; import org.bukkit.GameMode; import org.bukkit.Location; import org.bukkit.entity.Player; @@ -11,10 +10,8 @@ import org.bukkit.event.player.PlayerMoveEvent; import org.bukkit.event.player.PlayerRespawnEvent; import org.bukkit.potion.PotionEffect; import org.bukkit.potion.PotionEffectType; -import org.bukkit.plugin.java.JavaPlugin; - -public class PlayerListener extends JavaPlugin implements Listener { +public class PlayerListener implements Listener { @EventHandler public void onDeath(PlayerDeathEvent e) { @@ -34,19 +31,13 @@ public class PlayerListener extends JavaPlugin implements Listener { @EventHandler public void onPlayerRespawn(PlayerRespawnEvent e) { - final Player p = e.getPlayer(); + Player p = e.getPlayer(); p.setGameMode(GameMode.ADVENTURE); - Bukkit.getServer().getScheduler().scheduleSyncDelayedTask(getPlugin(Resurrection.class), new Runnable() - { - public void run() - { - p.addPotionEffect(new PotionEffect(PotionEffectType.INVISIBILITY, 1728000, 10, false)); - p.addPotionEffect(new PotionEffect(PotionEffectType.BLINDNESS, 1728000, 10, false)); - p.addPotionEffect(new PotionEffect(PotionEffectType.SLOW, 1728000, 10, false)); - p.setNoDamageTicks(1728000); - } - }, (1)); + p.addPotionEffect(new PotionEffect(PotionEffectType.INVISIBILITY, 200, 10, false)); + p.addPotionEffect(new PotionEffect(PotionEffectType.BLINDNESS, 200, 10, false)); + p.addPotionEffect(new PotionEffect(PotionEffectType.SLOW, 200, 10, false)); + p.setNoDamageTicks(1728000); } @EventHandler |