aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/net/brysonsteck/Resurrection/commands/CommandResurrect.java20
-rw-r--r--src/net/brysonsteck/Resurrection/player/PlayerListener.java20
-rw-r--r--src/plugin.yml2
3 files changed, 17 insertions, 25 deletions
diff --git a/src/net/brysonsteck/Resurrection/commands/CommandResurrect.java b/src/net/brysonsteck/Resurrection/commands/CommandResurrect.java
index 371e3c1..e26575c 100644
--- a/src/net/brysonsteck/Resurrection/commands/CommandResurrect.java
+++ b/src/net/brysonsteck/Resurrection/commands/CommandResurrect.java
@@ -61,12 +61,10 @@ public class CommandResurrect implements CommandExecutor {
resurrectPlayer.removePotionEffect(effect.getType());
resurrectPlayer.setGameMode(GameMode.SURVIVAL);
for(Player player : Bukkit.getOnlinePlayers()){
- try {
- player.playSound(player.getLocation(), Sound.ENTITY_ENDERDRAGON_GROWL, 1, 0);
- } catch (NoSuchFieldError e) {
- log.warning("NoSuchFieldError encountered, playing Wither noise instead.");
- player.playSound(player.getLocation(), Sound.WITHER_DEATH, 1, 0);
- }
+ // for versions > 1.8
+ player.playSound(player.getLocation(), Sound.ENTITY_WITHER_DEATH, 1, 0);
+ // for version 1.8
+ //player.playSound(player.getLocation(), Sound.WITHER_DEATH, 1, 0);
}
Bukkit.broadcastMessage(ChatColor.YELLOW +""+ ChatColor.BOLD + strings[0] + " has been resurrected manually by an admin!");
removeDeath(resurrectPlayer);
@@ -113,12 +111,10 @@ public class CommandResurrect implements CommandExecutor {
resurrectPlayer.removePotionEffect(effect.getType());
resurrectPlayer.setGameMode(GameMode.SURVIVAL);
for(Player player : Bukkit.getOnlinePlayers()){
- try {
- player.playSound(player.getLocation(), Sound.ENTITY_ENDERDRAGON_GROWL, 1, 0);
- } catch (NoSuchFieldError e) {
- log.warning("NoSuchFieldError encountered, playing Wither noise instead.");
- player.playSound(player.getLocation(), Sound.WITHER_DEATH, 1, 0);
- }
+ // for versions > 1.8
+ player.playSound(player.getLocation(), Sound.ENTITY_WITHER_DEATH, 1, 0);
+ // for version 1.8
+ //player.playSound(player.getLocation(), Sound.WITHER_DEATH, 1, 0);
}
Bukkit.broadcastMessage(strings[0] + " has been resurrected manually by an admin!");
removeDeath(resurrectPlayer);
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);
diff --git a/src/plugin.yml b/src/plugin.yml
index aeffccd..97990bf 100644
--- a/src/plugin.yml
+++ b/src/plugin.yml
@@ -5,7 +5,7 @@ version: '1.3'
website: https://brysonsteck.net/resurrection.html
description: Makes players wait large amounts of time before respawning!
database: false
-api-version: 1.9
+api-version: 1.13
commands:
about: