diff --git a/out/artifacts/Resurrection_jar/Resurrection.jar b/out/artifacts/Resurrection_jar/Resurrection.jar index 2892ee1..dc6854b 100644 Binary files a/out/artifacts/Resurrection_jar/Resurrection.jar and b/out/artifacts/Resurrection_jar/Resurrection.jar differ diff --git a/out/production/Resurrection/net/brysonsteck/Resurrection/PlayerListener.class b/out/production/Resurrection/net/brysonsteck/Resurrection/PlayerListener.class index 737b6ed..63ceec4 100644 Binary files a/out/production/Resurrection/net/brysonsteck/Resurrection/PlayerListener.class and b/out/production/Resurrection/net/brysonsteck/Resurrection/PlayerListener.class differ diff --git a/out/production/Resurrection/net/brysonsteck/Resurrection/TimeCheck.class b/out/production/Resurrection/net/brysonsteck/Resurrection/TimeCheck.class index 4f62c30..ad03115 100644 Binary files a/out/production/Resurrection/net/brysonsteck/Resurrection/TimeCheck.class and b/out/production/Resurrection/net/brysonsteck/Resurrection/TimeCheck.class differ diff --git a/src/net/brysonsteck/Resurrection/PlayerListener.java b/src/net/brysonsteck/Resurrection/PlayerListener.java index 0582356..f0c5d6e 100644 --- a/src/net/brysonsteck/Resurrection/PlayerListener.java +++ b/src/net/brysonsteck/Resurrection/PlayerListener.java @@ -17,7 +17,7 @@ public class PlayerListener implements Listener { public void onDeath(PlayerDeathEvent e) { System.out.println("Resurrection: A player has died!"); Player p = e.getEntity(); - p.setGameMode(GameMode.ADVENTURE); + p.setGameMode(GameMode.SPECTATOR); Long timeOfDeath = System.currentTimeMillis(); Long resurrectionTime = timeOfDeath + 86400000; @@ -27,25 +27,21 @@ public class PlayerListener implements Listener { String deathFormatted = death.formatTime(); String resurrectFormatted = resurrect.formatTime(); - - p.sendMessage("You have died! You will be able to respawn in 24 hours."); + p.sendMessage("You have died!! You will be able to respawn in the next " + resurrectFormatted); } @EventHandler public void onPlayerRespawn(PlayerRespawnEvent e) { Player p = e.getPlayer(); - p.sendMessage("You have respawned"); - p.addPotionEffect(new PotionEffect(PotionEffectType.SLOW,500000, 500)); - p.addPotionEffect(new PotionEffect(PotionEffectType.BLINDNESS, 500000, 500)); + p.addPotionEffect(new PotionEffect(PotionEffectType.BLINDNESS, 86400, 255)); } @EventHandler public void onPlayerMove(PlayerMoveEvent e) { Player p = e.getPlayer(); Location location = p.getLocation(); - if (p.getGameMode() == GameMode.SPECTATOR) { + if (p.getGameMode() == GameMode.SPECTATOR && p.hasPotionEffect(PotionEffectType.BLINDNESS)) { p.teleport(location); } - } } diff --git a/src/net/brysonsteck/Resurrection/TImeCheck.java b/src/net/brysonsteck/Resurrection/TimeCheck.java similarity index 100% rename from src/net/brysonsteck/Resurrection/TImeCheck.java rename to src/net/brysonsteck/Resurrection/TimeCheck.java