diff options
author | Bryson Steck <steck.bryson@gmail.com> | 2021-06-15 18:56:02 -0600 |
---|---|---|
committer | Bryson Steck <steck.bryson@gmail.com> | 2021-06-15 18:56:02 -0600 |
commit | bbac7e1509c8fd526beb0585d6860aa7b3840f48 (patch) | |
tree | e40ab3a8cdfbf4ef3b3d0a12bdd8181d823c5170 /src/net/brysonsteck/Resurrection/player | |
parent | e7683204ef07bb221853b671e3effb0187fc8340 (diff) | |
download | resurrection-bbac7e1509c8fd526beb0585d6860aa7b3840f48.tar resurrection-bbac7e1509c8fd526beb0585d6860aa7b3840f48.tar.gz resurrection-bbac7e1509c8fd526beb0585d6860aa7b3840f48.tar.bz2 |
does changing gamemodes work?
Diffstat (limited to 'src/net/brysonsteck/Resurrection/player')
-rw-r--r-- | src/net/brysonsteck/Resurrection/player/PlayerListener.java | 10 | ||||
-rw-r--r-- | src/net/brysonsteck/Resurrection/player/ResurrectPlayer.java | 1 |
2 files changed, 6 insertions, 5 deletions
diff --git a/src/net/brysonsteck/Resurrection/player/PlayerListener.java b/src/net/brysonsteck/Resurrection/player/PlayerListener.java index 8bc299f..67a31db 100644 --- a/src/net/brysonsteck/Resurrection/player/PlayerListener.java +++ b/src/net/brysonsteck/Resurrection/player/PlayerListener.java @@ -39,7 +39,7 @@ public class PlayerListener implements Listener { Thread.sleep(5000); } catch (InterruptedException interruptedException) { interruptedException.printStackTrace(); - p.sendMessage("Failed to make the thread sleep!"); + p.sendMessage("[Resurrection] An error has occurred! Please contact the admin. (Failed to make the thread sleep!)"); } ResurrectPlayer resurrectPlayer = new ResurrectPlayer(p); }).start(); @@ -53,14 +53,14 @@ public class PlayerListener implements Listener { new BukkitRunnable() { @Override public void run() { - PotionEffect invisibility = new PotionEffect(PotionEffectType.INVISIBILITY, 200, 10, false); - PotionEffect blindness = new PotionEffect(PotionEffectType.BLINDNESS, 200, 10, false); - PotionEffect slowness = new PotionEffect(PotionEffectType.SLOW, 200, 10, false); + PotionEffect invisibility = new PotionEffect(PotionEffectType.INVISIBILITY, 100, 10, false); + PotionEffect blindness = new PotionEffect(PotionEffectType.BLINDNESS, 100, 10, false); + PotionEffect slowness = new PotionEffect(PotionEffectType.SLOW, 100, 10, false); invisibility.apply(p); blindness.apply(p); slowness.apply(p); } - }.runTaskLater(JavaPlugin.getProvidingPlugin(Resurrection.class), 20); + }.runTaskLater(JavaPlugin.getProvidingPlugin(Resurrection.class), 1); } diff --git a/src/net/brysonsteck/Resurrection/player/ResurrectPlayer.java b/src/net/brysonsteck/Resurrection/player/ResurrectPlayer.java index b47c6af..412387f 100644 --- a/src/net/brysonsteck/Resurrection/player/ResurrectPlayer.java +++ b/src/net/brysonsteck/Resurrection/player/ResurrectPlayer.java @@ -8,6 +8,7 @@ import org.bukkit.potion.PotionEffect; public class ResurrectPlayer { public ResurrectPlayer(Player p) { + p.setGameMode(GameMode.SURVIVAL); Bukkit.broadcastMessage(p.getDisplayName() + " has resurrected!"); } } |