TF-EssentialsX/Essentials/src/com/earth2me/essentials/commands/Commanddepth.java
ementalo 7b066c0468 [trunk] translations
git-svn-id: https://svn.java.net/svn/essentials~svn/trunk@1399 e251c2fe-e539-e718-e476-b85c1f46cddb
2011-05-09 21:37:02 +00:00

33 lines
639 B
Java

package com.earth2me.essentials.commands;
import org.bukkit.Server;
import com.earth2me.essentials.User;
import com.earth2me.essentials.Util;
public class Commanddepth extends EssentialsCommand
{
public Commanddepth()
{
super("depth");
}
@Override
public void run(Server server, User user, String commandLabel, String[] args) throws Exception
{
charge(user);
int y = user.getLocation().getBlockY() - 63;
if (y > 0)
{
user.sendMessage(Util.format("depthAboveSea", y));
}
else if (y < 0)
{
user.sendMessage(Util.format("depthBelowSea", (-y)));
}
else
{
user.sendMessage(Util.i18n("depth"));
}
}
}