summaryrefslogtreecommitdiffstats
path: root/Essentials/src/com/earth2me/essentials/commands/Commanddepth.java
diff options
context:
space:
mode:
Diffstat (limited to 'Essentials/src/com/earth2me/essentials/commands/Commanddepth.java')
-rw-r--r--Essentials/src/com/earth2me/essentials/commands/Commanddepth.java20
1 files changed, 14 insertions, 6 deletions
diff --git a/Essentials/src/com/earth2me/essentials/commands/Commanddepth.java b/Essentials/src/com/earth2me/essentials/commands/Commanddepth.java
index d01594809..fb991f572 100644
--- a/Essentials/src/com/earth2me/essentials/commands/Commanddepth.java
+++ b/Essentials/src/com/earth2me/essentials/commands/Commanddepth.java
@@ -1,7 +1,6 @@
package com.earth2me.essentials.commands;
import org.bukkit.Server;
-import com.earth2me.essentials.Essentials;
import com.earth2me.essentials.User;
@@ -13,12 +12,21 @@ public class Commanddepth extends EssentialsCommand
}
@Override
- public void run(Server server, Essentials parent, User user, String commandLabel, String[] args) throws Exception
+ public void run(Server server, User user, String commandLabel, String[] args) throws Exception
{
- user.charge(this);
+ charge(user);
int y = user.getLocation().getBlockY() - 63;
- if (y > 0) user.sendMessage("§7You are " + y + " block(s) above sea level.");
- else if (y < 0) user.sendMessage("§7You are " + (-y) + " block(s) below sea level.");
- else user.sendMessage("§7You are at sea level.");
+ if (y > 0)
+ {
+ user.sendMessage("§7You are " + y + " block(s) above sea level.");
+ }
+ else if (y < 0)
+ {
+ user.sendMessage("§7You are " + (-y) + " block(s) below sea level.");
+ }
+ else
+ {
+ user.sendMessage("§7You are at sea level.");
+ }
}
}