Compare commits

..

1 Commits

Author SHA1 Message Date
renovate[bot]
548c320510 Update dependency com.gradleup.shadow to v9 2025-09-26 10:35:52 +00:00
2 changed files with 5 additions and 10 deletions

View File

@@ -150,9 +150,8 @@ public class ListCmd extends SubCommand {
page = 0; page = 0;
} }
Plot currentPlot = player.getCurrentPlot(); String world = player.getCurrentPlot().getWorldName();
String world = currentPlot != null ? currentPlot.getWorldName() : null; PlotArea area = player.getCurrentPlot().getArea();
PlotArea area = currentPlot != null ? currentPlot.getArea() : null;
String arg = args[0].toLowerCase(); String arg = args[0].toLowerCase();
final boolean[] sort = new boolean[]{true}; final boolean[] sort = new boolean[]{true};
@@ -227,17 +226,13 @@ public class ListCmd extends SubCommand {
); );
return false; return false;
} }
if (world != null && !player.hasPermission("plots.list.world." + world)) { if (!player.hasPermission("plots.list.world." + world)) {
player.sendMessage( player.sendMessage(
TranslatableCaption.of("permission.no_permission"), TranslatableCaption.of("permission.no_permission"),
TagResolver.resolver("node", Tag.inserting(Component.text("plots.list.world." + world))) TagResolver.resolver("node", Tag.inserting(Component.text("plots.list.world." + world)))
); );
return false; return false;
} }
if (world == null) {
player.sendMessage(TranslatableCaption.of("errors.not_in_plot_world"));
return false;
}
plotConsumer.accept(PlotQuery.newQuery().inWorld(world)); plotConsumer.accept(PlotQuery.newQuery().inWorld(world));
} }
case "expired" -> { case "expired" -> {
@@ -262,7 +257,7 @@ public class ListCmd extends SubCommand {
); );
return false; return false;
} }
if (world != null && !player.hasPermission("plots.list.world." + world)) { if (!player.hasPermission("plots.list.world." + world)) {
player.sendMessage( player.sendMessage(
TranslatableCaption.of("permission.no_permission"), TranslatableCaption.of("permission.no_permission"),
TagResolver.resolver("node", Tag.inserting(Component.text("plots.list.world." + world))) TagResolver.resolver("node", Tag.inserting(Component.text("plots.list.world." + world)))

View File

@@ -33,7 +33,7 @@ vault = "1.7.1"
serverlib = "2.3.7" serverlib = "2.3.7"
# Gradle plugins # Gradle plugins
shadow = "8.3.9" shadow = "9.2.2"
grgit = "4.1.1" grgit = "4.1.1"
spotless = "7.2.1" spotless = "7.2.1"
publish = "0.34.0" publish = "0.34.0"