Use world's sea level for depth command (#3268)

This commit is contained in:
pop4959 2020-05-12 21:05:57 -07:00 committed by GitHub
parent 02e6b5f1b3
commit a93ca9b7bc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -13,7 +13,7 @@ public class Commanddepth extends EssentialsCommand {
@Override
public void run(final Server server, final User user, final String commandLabel, final String[] args) throws Exception {
final int depth = user.getLocation().getBlockY() - 63;
final int depth = user.getLocation().getBlockY() - user.getWorld().getSeaLevel();
if (depth > 0) {
user.sendMessage(tl("depthAboveSea", depth));
} else if (depth < 0) {