Fix inbox deletion perm

This commit is contained in:
boy0001 2015-08-28 09:53:35 +10:00
parent 552ace359a
commit ad94637c2a
2 changed files with 5 additions and 0 deletions

View File

@ -136,6 +136,7 @@ public class Inbox extends SubCommand {
case "delete": {
if (!inbox.canModify(plot, player)) {
sendMessage(player, C.NO_PERM_INBOX_MODIFY);
return false;
}
if (args.length != 3) {
sendMessage(player, C.COMMAND_SYNTAX, "/plot inbox " + inbox.toString() + " delete <index>");

View File

@ -216,6 +216,10 @@ public class ClusterManager {
}
public static PlotId estimatePlotId(final Location loc) {
Plot plot = MainUtil.getPlot(loc);
if (plot != null) {
return plot.id;
}
final PlotId a = new PlotId(0, 0);
final PlotId b = new PlotId(1, 1);
int xw;