aboutsummaryrefslogtreecommitdiff
path: root/src/net/brysonsteck/Resurrection/player
diff options
context:
space:
mode:
authorBryson Steck <steck.bryson@gmail.com>2022-01-15 16:19:03 -0700
committerBryson Steck <steck.bryson@gmail.com>2022-01-15 16:19:03 -0700
commitdddb321c70ce2ac3b781e5f39eded8fb5fb1ff14 (patch)
treed1766697c4f777399d4675c8670d1c6bd200af1e /src/net/brysonsteck/Resurrection/player
parent0188e381b25764c4d849c453d41683144d4307cc (diff)
downloadresurrection-dddb321c70ce2ac3b781e5f39eded8fb5fb1ff14.tar
resurrection-dddb321c70ce2ac3b781e5f39eded8fb5fb1ff14.tar.gz
resurrection-dddb321c70ce2ac3b781e5f39eded8fb5fb1ff14.tar.bz2
found the solution, preparing for v1.3
Diffstat (limited to 'src/net/brysonsteck/Resurrection/player')
-rw-r--r--src/net/brysonsteck/Resurrection/player/PlayerListener.java20
1 files changed, 8 insertions, 12 deletions
diff --git a/src/net/brysonsteck/Resurrection/player/PlayerListener.java b/src/net/brysonsteck/Resurrection/player/PlayerListener.java
index 6c95418..424e0fc 100644
--- a/src/net/brysonsteck/Resurrection/player/PlayerListener.java
+++ b/src/net/brysonsteck/Resurrection/player/PlayerListener.java
@@ -148,12 +148,10 @@ public class PlayerListener implements Listener {
p.teleport(spawn);
}
for(Player p : Bukkit.getOnlinePlayers()){
- try {
- p.playSound(p.getLocation(), Sound.ENTITY_ENDERDRAGON_GROWL, 1, 0);
- } catch (NoSuchFieldError e) {
- log.warning("NoSuchFieldError encountered, playing Wither noise instead.");
- p.playSound(p.getLocation(), Sound.WITHER_DEATH, 1, 0);
- }
+ // for versions > 1.8
+ p.playSound(p.getLocation(), Sound.ENTITY_WITHER_DEATH, 1, 0);
+ // for version 1.8
+ //p.playSound(p.getLocation(), Sound.WITHER_DEATH, 1, 0);
}
}
}.runTaskLater(JavaPlugin.getProvidingPlugin(Resurrection.class), timeToResurrection);
@@ -244,12 +242,10 @@ public class PlayerListener implements Listener {
p.teleport(spawn);
}
for(Player p : Bukkit.getOnlinePlayers()){
- try {
- p.playSound(p.getLocation(), Sound.ENTITY_ENDERDRAGON_GROWL, 1, 0);
- } catch (NoSuchFieldError e) {
- log.warning("NoSuchFieldError encountered, playing Wither noise instead.");
- p.playSound(p.getLocation(), Sound.WITHER_DEATH, 1, 0);
- }
+ // for versions > 1.8
+ p.playSound(p.getLocation(), Sound.ENTITY_WITHER_DEATH, 1, 0);
+ // for version 1.8
+ //p.playSound(p.getLocation(), Sound.WITHER_DEATH, 1, 0);
}
}
}.runTaskLater(JavaPlugin.getProvidingPlugin(Resurrection.class), timeToResurrection);