Account for relative coordinates in PlaySound. Fixes BUKKIT-4639

This commit is contained in:
Wesley Wolfe
2013-08-02 20:26:55 -05:00
parent d789396b2d
commit 02f2b5e290
2 changed files with 16 additions and 4 deletions

View File

@@ -29,7 +29,7 @@ public class PlaySoundCommand extends VanillaCommand {
final Player player = Bukkit.getPlayerExact(playerArg);
if (player == null) {
sender.sendMessage(ChatColor.RED + "Can't find player %s" + playerArg);
sender.sendMessage(ChatColor.RED + "Can't find player " + playerArg);
return false;
}
@@ -51,11 +51,11 @@ public class PlaySoundCommand extends VanillaCommand {
case 6:
volume = getDouble(sender, args[5], 0.0D, Float.MAX_VALUE);
case 5:
z = getDouble(sender, args[4]);
z = getRelativeDouble(z, sender, args[4]);
case 4:
y = getDouble(sender, args[3]);
y = getRelativeDouble(y, sender, args[3]);
case 3:
x = getDouble(sender, args[2]);
x = getRelativeDouble(x, sender, args[2]);
case 2:
// Noop
}