summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNecrodoom <doomed.war@gmail.com>2013-02-18 16:19:15 +0200
committerKHobbits <rob@khobbits.co.uk>2013-02-18 15:08:55 +0000
commite63276242ca4c8c16cf46eba020f9bd436f94773 (patch)
tree539e8911b8f69904d24c0f28ecd381e67bd3d453
parent3ddbeea45a141d33da82fbef9168cdc6d31e6e77 (diff)
downloadEssentials-e63276242ca4c8c16cf46eba020f9bd436f94773.tar
Essentials-e63276242ca4c8c16cf46eba020f9bd436f94773.tar.gz
Essentials-e63276242ca4c8c16cf46eba020f9bd436f94773.tar.lz
Essentials-e63276242ca4c8c16cf46eba020f9bd436f94773.tar.xz
Essentials-e63276242ca4c8c16cf46eba020f9bd436f94773.zip
make sure player isnt dead before healing
-rw-r--r--Essentials/src/com/earth2me/essentials/commands/Commandgod.java2
-rw-r--r--Essentials/src/com/earth2me/essentials/commands/Commandheal.java4
-rw-r--r--Essentials/src/messages.properties1
-rw-r--r--Essentials/src/messages_cs.properties1
-rw-r--r--Essentials/src/messages_da.properties1
-rw-r--r--Essentials/src/messages_de.properties1
-rw-r--r--Essentials/src/messages_en.properties2
-rw-r--r--Essentials/src/messages_es.properties1
-rw-r--r--Essentials/src/messages_fi.properties1
-rw-r--r--Essentials/src/messages_fr.properties1
-rw-r--r--Essentials/src/messages_it.properties1
-rw-r--r--Essentials/src/messages_nl.properties1
-rw-r--r--Essentials/src/messages_pl.properties1
-rw-r--r--Essentials/src/messages_pt.properties1
-rw-r--r--Essentials/src/messages_se.properties1
15 files changed, 19 insertions, 1 deletions
diff --git a/Essentials/src/com/earth2me/essentials/commands/Commandgod.java b/Essentials/src/com/earth2me/essentials/commands/Commandgod.java
index 571003c73..9b9dbf221 100644
--- a/Essentials/src/com/earth2me/essentials/commands/Commandgod.java
+++ b/Essentials/src/com/earth2me/essentials/commands/Commandgod.java
@@ -40,7 +40,7 @@ public class Commandgod extends EssentialsCommand
private void godPlayer(User player, boolean enabled)
{
player.setGodModeEnabled(enabled);
- if (enabled)
+ if (enabled && player.getHealth() != 0)
{
player.setHealth(player.getMaxHealth());
player.setFoodLevel(20);
diff --git a/Essentials/src/com/earth2me/essentials/commands/Commandheal.java b/Essentials/src/com/earth2me/essentials/commands/Commandheal.java
index 285d37233..55045ecf3 100644
--- a/Essentials/src/com/earth2me/essentials/commands/Commandheal.java
+++ b/Essentials/src/com/earth2me/essentials/commands/Commandheal.java
@@ -69,6 +69,10 @@ public class Commandheal extends EssentialsCommand
private void healPlayer(final Player player)
{
+ if (player.getHealth() == 0)
+ {
+ throw new Exception(_("healDead"));
+ }
player.setHealth(player.getMaxHealth());
player.setFoodLevel(20);
player.setFireTicks(0);
diff --git a/Essentials/src/messages.properties b/Essentials/src/messages.properties
index 367f18eff..6496a5cd2 100644
--- a/Essentials/src/messages.properties
+++ b/Essentials/src/messages.properties
@@ -121,6 +121,7 @@ hatPlaced=\u00a76Enjoy your new hat!
hatRemoved=\u00a76Your hat has been removed.
haveBeenReleased=\u00a76You have been released.
heal=\u00a76You have been healed.
+healDead=\u00a74You cannot heal someone who is dead!
healOther=\u00a76Healed\u00a7c {0}\u00a76.
helpConsole=To view help from the console, type ?.
helpFrom=\u00a76Commands from {0}:
diff --git a/Essentials/src/messages_cs.properties b/Essentials/src/messages_cs.properties
index b5b69ae31..9312984c5 100644
--- a/Essentials/src/messages_cs.properties
+++ b/Essentials/src/messages_cs.properties
@@ -124,6 +124,7 @@ hatPlaced=\u00a7eEnjoy your new hat!
hatRemoved=\u00a7eYour hat has been removed.
haveBeenReleased=\u00a77Byl jsi uvolnen
heal=\u00a77Byl jsi uzdraven.
+healDead=\u00a74You cannot heal someone who is dead!
healOther=\u00a77Uzdravil jsi hrace {0}.
helpConsole=Pokud chces videt napovedu z konzole, napis ?.
helpFrom=\u00a77Prikazy od{0}:
diff --git a/Essentials/src/messages_da.properties b/Essentials/src/messages_da.properties
index 651ab36ca..b31781330 100644
--- a/Essentials/src/messages_da.properties
+++ b/Essentials/src/messages_da.properties
@@ -121,6 +121,7 @@ hatPlaced=\u00a7eEnjoy your new hat!
hatRemoved=\u00a7eYour hat has been removed.
haveBeenReleased=\u00a77Du er blevet l\u00f8sladt
heal=\u00a77Du er blevet healed.
+healDead=\u00a74You cannot heal someone who is dead!
healOther=\u00a77Healed {0}.
helpConsole=For at se hj\u00e6lp fra konsolen, skriv ?.
helpFrom=\u00a77Commands from {0}:
diff --git a/Essentials/src/messages_de.properties b/Essentials/src/messages_de.properties
index eb287d0a5..dabbef8f7 100644
--- a/Essentials/src/messages_de.properties
+++ b/Essentials/src/messages_de.properties
@@ -121,6 +121,7 @@ hatPlaced=\u00a7eEnjoy your new hat!
hatRemoved=\u00a7eYour hat has been removed.
haveBeenReleased=\u00a77Du wurdest frei gelassen.
heal=\u00a77Du wurdest geheilt.
+healDead=\u00a74You cannot heal someone who is dead!
healOther=\u00a77{0} geheilt.
helpConsole=Um die Hilfe der Konsole zu sehen, schreibe ?.
helpFrom=\u00a77Commands from {0}:
diff --git a/Essentials/src/messages_en.properties b/Essentials/src/messages_en.properties
index 367f18eff..2b521da1c 100644
--- a/Essentials/src/messages_en.properties
+++ b/Essentials/src/messages_en.properties
@@ -121,7 +121,9 @@ hatPlaced=\u00a76Enjoy your new hat!
hatRemoved=\u00a76Your hat has been removed.
haveBeenReleased=\u00a76You have been released.
heal=\u00a76You have been healed.
+healDead=\u00a7cYou cannot heal someone who is dead!
healOther=\u00a76Healed\u00a7c {0}\u00a76.
+healDead=\u00a74You cannot heal someone who is dead!
helpConsole=To view help from the console, type ?.
helpFrom=\u00a76Commands from {0}:
helpLine=\u00a76/{0}\u00a7r: {1}
diff --git a/Essentials/src/messages_es.properties b/Essentials/src/messages_es.properties
index 4c0dc3b39..d36db5964 100644
--- a/Essentials/src/messages_es.properties
+++ b/Essentials/src/messages_es.properties
@@ -121,6 +121,7 @@ hatPlaced=\u00a7eDisfruta tu nuevo sombrero!
hatRemoved=\u00a7eTu sombrero a sido removido.
haveBeenReleased=\u00a77Has sido liberado.
heal=\u00a77Has sido curado.
+healDead=\u00a74You cannot heal someone who is dead!
healOther=\u00a77Has curado a {0}.
helpConsole=Para obtener ayuda de la consola, escribe ?.
helpFrom=\u00a77Comandos de {0}:
diff --git a/Essentials/src/messages_fi.properties b/Essentials/src/messages_fi.properties
index 95242475b..6d2fea177 100644
--- a/Essentials/src/messages_fi.properties
+++ b/Essentials/src/messages_fi.properties
@@ -121,6 +121,7 @@ hatPlaced=\u00a7eNauti uudesta hatustasi!
hatRemoved=\u00a7eYour hat has been removed.
haveBeenReleased=\u00a77Sinut on vapautettu
heal=\u00a77Sinut on parannettu.
+healDead=\u00a74You cannot heal someone who is dead!
healOther=\u00a77Paransit pelaajan {0}.
helpConsole=Katsoaksesi apua konsolista, kirjoita ?.
helpFrom=\u00a77Komennot {0}:
diff --git a/Essentials/src/messages_fr.properties b/Essentials/src/messages_fr.properties
index a90cf2655..ddca65337 100644
--- a/Essentials/src/messages_fr.properties
+++ b/Essentials/src/messages_fr.properties
@@ -121,6 +121,7 @@ hatPlaced=\u00a7eProfitez bien de votre nouveau chapeau !
hatRemoved=\u00a7eVotre chapeau a \u00e9t\u00e9 retir\u00e9.
haveBeenReleased=\u00a77Vous avez \u00e9t\u00e9 lib\u00e9r\u00e9.
heal=\u00a77Vous avez \u00e9t\u00e9 soign\u00e9.
+healDead=\u00a74You cannot heal someone who is dead!
healOther=\u00a77{0} a \u00e9t\u00e9 soign\u00e9.
helpConsole=Pour voir l''aide tapez ?
helpFrom=\u00a77Commands from {0}:
diff --git a/Essentials/src/messages_it.properties b/Essentials/src/messages_it.properties
index c13fe7e54..73d268799 100644
--- a/Essentials/src/messages_it.properties
+++ b/Essentials/src/messages_it.properties
@@ -121,6 +121,7 @@ hatPlaced=\u00a7eEnjoy your new hat!
hatRemoved=\u00a7eYour hat has been removed.
haveBeenReleased=\u00a77Sei stato scarcerato.
heal=\u00a77Sei stato curato.
+healDead=\u00a74You cannot heal someone who is dead!
healOther=\u00a77{0} e'' stato curato.
helpConsole=Digitare ? per la guida.
helpFrom=\u00a77Comandi da {0}:
diff --git a/Essentials/src/messages_nl.properties b/Essentials/src/messages_nl.properties
index e37e715ec..175e19a81 100644
--- a/Essentials/src/messages_nl.properties
+++ b/Essentials/src/messages_nl.properties
@@ -121,6 +121,7 @@ hatPlaced=\u00a7eGeniet van je nieuwe hoed!
hatRemoved=\u00a7eYour hat has been removed.
haveBeenReleased=\u00a77Je bent bevrijdt
heal=\u00a77Je bent genezen.
+healDead=\u00a74You cannot heal someone who is dead!
healOther=\u00a77Je geneezde {0}.
helpConsole=type ? om de consolehelp weer te geven.
helpFrom=\u00a77Commands from {0}:
diff --git a/Essentials/src/messages_pl.properties b/Essentials/src/messages_pl.properties
index 4080179be..6d0f6bf13 100644
--- a/Essentials/src/messages_pl.properties
+++ b/Essentials/src/messages_pl.properties
@@ -121,6 +121,7 @@ hatPlaced=\u00a7eCiesz sie nowym kapeluszem!
hatRemoved=\u00a7eYour hat has been removed.
haveBeenReleased=\u00a77Zostales wypuszczony.
heal=\u00a77Uleczony
+healDead=\u00a74You cannot heal someone who is dead!
healOther=\u00a77Uleczono {0}.
helpConsole=Aby uzyskac pomoc z konsoli, wpisz \u0093????.
helpFrom=\u00a77Komendy od {0}:
diff --git a/Essentials/src/messages_pt.properties b/Essentials/src/messages_pt.properties
index ecbf99296..c4eb6d44c 100644
--- a/Essentials/src/messages_pt.properties
+++ b/Essentials/src/messages_pt.properties
@@ -121,6 +121,7 @@ hatPlaced=\u00a7eAproveite o seu novo chapeu!
hatRemoved=\u00a7eYour hat has been removed.
haveBeenReleased=\u00a77Voc\u00ea foi liberado.
heal=\u00a77Voc\u00ea foi curado.
+healDead=\u00a74You cannot heal someone who is dead!
healOther=\u00a77Curado {0}.
helpConsole=Para ver ajuda do console, digite ?.
helpFrom=\u00a77Comandos a partir de {0}:
diff --git a/Essentials/src/messages_se.properties b/Essentials/src/messages_se.properties
index 687e58a35..e910a5cc3 100644
--- a/Essentials/src/messages_se.properties
+++ b/Essentials/src/messages_se.properties
@@ -121,6 +121,7 @@ hatPlaced=\u00a7eNjut av din nya hatt!
hatRemoved=\u00a7eDin hatt har tagits bort.
haveBeenReleased=\u00a77Du har blivit friad
heal=\u00a77Du har blivit l\u00e4kt.
+healDead=\u00a74You cannot heal someone who is dead!
healOther=\u00a77L\u00e4kte {0}.
helpConsole=F\u00f6r att visa hj\u00e4lp fr\u00e5n konsolen, skriv ?.
helpFrom=\u00a77Kommandon fr\u00e5n {0}: