fix: /plot music being able to be used on unclaimed plots (#3432)

This commit is contained in:
Alex 2022-01-11 11:01:36 +01:00 committed by GitHub
parent b43d08f4aa
commit 8f7c2e4c02
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -76,6 +76,10 @@ public class Music extends SubCommand {
player.sendMessage(TranslatableCaption.of("errors.not_in_plot")); player.sendMessage(TranslatableCaption.of("errors.not_in_plot"));
return false; return false;
} }
if (!plot.hasOwner()) {
player.sendMessage(TranslatableCaption.of("info.plot_unowned"));
return false;
}
if (!plot.isAdded(player.getUUID()) && !Permissions if (!plot.isAdded(player.getUUID()) && !Permissions
.hasPermission(player, Permission.PERMISSION_ADMIN_MUSIC_OTHER)) { .hasPermission(player, Permission.PERMISSION_ADMIN_MUSIC_OTHER)) {
player.sendMessage( player.sendMessage(