mirror of
https://github.com/IntellectualSites/PlotSquared.git
synced 2025-08-04 13:35:27 +02:00
Fix nested command configuration
This commit is contained in:
@@ -147,7 +147,7 @@ public class MainCommand extends Command {
|
||||
if (EconHandler.manager != null) {
|
||||
PlotArea area = player.getApplicablePlotArea();
|
||||
if (area != null) {
|
||||
Double price = area.PRICES.get(cmd.getId());
|
||||
Double price = area.PRICES.get(cmd.getFullId());
|
||||
if (price != null && EconHandler.manager.getMoney(player) < price) {
|
||||
failure.run();
|
||||
return;
|
||||
@@ -162,7 +162,7 @@ public class MainCommand extends Command {
|
||||
if (EconHandler.manager != null) {
|
||||
PlotArea area = player.getApplicablePlotArea();
|
||||
if (area != null) {
|
||||
Double price = area.PRICES.get(cmd.getId());
|
||||
Double price = area.PRICES.get(cmd.getFullId());
|
||||
if (price != null && EconHandler.manager.getMoney(player) < price) {
|
||||
failure.run();
|
||||
return;
|
||||
|
@@ -18,15 +18,15 @@ public abstract class SetCommand extends SubCommand {
|
||||
return !sendMessage(plr, C.NOT_IN_PLOT);
|
||||
}
|
||||
if (!plot.hasOwner()) {
|
||||
if (!Permissions.hasPermission(plr, "plots.admin.command." + getId())) {
|
||||
MainUtil.sendMessage(plr, C.NO_PERMISSION, "plots.admin.command." + getId());
|
||||
if (!Permissions.hasPermission(plr, "plots.admin.command." + getFullId())) {
|
||||
MainUtil.sendMessage(plr, C.NO_PERMISSION, "plots.admin.command." + getFullId());
|
||||
MainUtil.sendMessage(plr, C.PLOT_NOT_CLAIMED);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
if (!plot.isOwner(plr.getUUID())) {
|
||||
if (!Permissions.hasPermission(plr, "plots.admin.command." + getId())) {
|
||||
MainUtil.sendMessage(plr, C.NO_PERMISSION, "plots.admin.command." + getId());
|
||||
if (!Permissions.hasPermission(plr, "plots.admin.command." + getFullId())) {
|
||||
MainUtil.sendMessage(plr, C.NO_PERMISSION, "plots.admin.command." + getFullId());
|
||||
MainUtil.sendMessage(plr, C.NO_PLOT_PERMS);
|
||||
return false;
|
||||
}
|
||||
|
Reference in New Issue
Block a user