From 8f7c2e4c023b48de90f5f2a70c189688b9fc4458 Mon Sep 17 00:00:00 2001 From: Alex Date: Tue, 11 Jan 2022 11:01:36 +0100 Subject: [PATCH] fix: `/plot music` being able to be used on unclaimed plots (#3432) --- Core/src/main/java/com/plotsquared/core/command/Music.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Core/src/main/java/com/plotsquared/core/command/Music.java b/Core/src/main/java/com/plotsquared/core/command/Music.java index f6a31dbd1..35c866d69 100644 --- a/Core/src/main/java/com/plotsquared/core/command/Music.java +++ b/Core/src/main/java/com/plotsquared/core/command/Music.java @@ -76,6 +76,10 @@ public class Music extends SubCommand { player.sendMessage(TranslatableCaption.of("errors.not_in_plot")); return false; } + if (!plot.hasOwner()) { + player.sendMessage(TranslatableCaption.of("info.plot_unowned")); + return false; + } if (!plot.isAdded(player.getUUID()) && !Permissions .hasPermission(player, Permission.PERMISSION_ADMIN_MUSIC_OTHER)) { player.sendMessage(