Account for relative coordinates in PlaySound. Fixes BUKKIT-4639
This commit is contained in:
@@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user