aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBryson Steck <steck.bryson@gmail.com>2021-06-06 12:29:22 -0600
committerBryson Steck <steck.bryson@gmail.com>2021-06-06 12:29:22 -0600
commit0a94eaf19095615e03fb2bef1cecaa8bcc13d227 (patch)
tree6227b0546481159079b8676b793084d1e9ffc224
parente6010bdb97612b02d2a2297335eb18fd458f6fb8 (diff)
downloadresurrection-0a94eaf19095615e03fb2bef1cecaa8bcc13d227.tar
resurrection-0a94eaf19095615e03fb2bef1cecaa8bcc13d227.tar.gz
resurrection-0a94eaf19095615e03fb2bef1cecaa8bcc13d227.tar.bz2
force respawn on death
-rw-r--r--out/artifacts/Resurrection_jar/Resurrection.jarbin1333930 -> 1334010 bytes
-rw-r--r--out/production/Resurrection/net/brysonsteck/Resurrection/PlayerListener.classbin2167 -> 2334 bytes
-rw-r--r--src/net/brysonsteck/Resurrection/PlayerListener.java1
3 files changed, 1 insertions, 0 deletions
diff --git a/out/artifacts/Resurrection_jar/Resurrection.jar b/out/artifacts/Resurrection_jar/Resurrection.jar
index 2e7d7ca..48b3b72 100644
--- a/out/artifacts/Resurrection_jar/Resurrection.jar
+++ b/out/artifacts/Resurrection_jar/Resurrection.jar
Binary files differ
diff --git a/out/production/Resurrection/net/brysonsteck/Resurrection/PlayerListener.class b/out/production/Resurrection/net/brysonsteck/Resurrection/PlayerListener.class
index 40a5c18..aac069e 100644
--- a/out/production/Resurrection/net/brysonsteck/Resurrection/PlayerListener.class
+++ b/out/production/Resurrection/net/brysonsteck/Resurrection/PlayerListener.class
Binary files differ
diff --git a/src/net/brysonsteck/Resurrection/PlayerListener.java b/src/net/brysonsteck/Resurrection/PlayerListener.java
index a12ec52..fe8f2b7 100644
--- a/src/net/brysonsteck/Resurrection/PlayerListener.java
+++ b/src/net/brysonsteck/Resurrection/PlayerListener.java
@@ -19,6 +19,7 @@ public class PlayerListener implements Listener {
public void onDeath(PlayerDeathEvent e) {
System.out.println("Resurrection: A player has died!");
Player p = e.getEntity();
+ p.spigot().respawn();
p.setGameMode(GameMode.SPECTATOR);
p.addPotionEffect(new PotionEffect(PotionEffectType.SLOW,1000000000, 500));
p.addPotionEffect(new PotionEffect(PotionEffectType.BLINDNESS, 1000000000, 500));