Permission stuff

This commit is contained in:
boy0001
2015-08-02 06:11:28 +10:00
parent e314f46c47
commit 4acf88e09d
8 changed files with 62 additions and 15 deletions

View File

@ -62,6 +62,7 @@ import com.intellectualcrafters.plot.object.RunnableVal;
import com.intellectualcrafters.plot.util.AbstractTitle;
import com.intellectualcrafters.plot.util.BlockManager;
import com.intellectualcrafters.plot.util.ChunkManager;
import com.intellectualcrafters.plot.util.EconHandler;
import com.intellectualcrafters.plot.util.EventUtil;
import com.intellectualcrafters.plot.util.ExpireManager;
import com.intellectualcrafters.plot.util.MainUtil;
@ -119,6 +120,7 @@ public class DebugExec extends SubCommand {
scope.put("BlockManager", BlockManager.manager);
scope.put("SetupUtils", SetupUtils.manager);
scope.put("EventUtil", EventUtil.manager);
scope.put("EconHandler", EconHandler.manager);
scope.put("UUIDHandler", UUIDHandler.implementation);
scope.put("DBFunc", DBFunc.dbManager);
scope.put("HybridUtils", HybridUtils.manager);

View File

@ -16,7 +16,6 @@ public abstract class EconHandler {
public abstract void withdrawMoney(PlotPlayer player, double amount);
public abstract void depositMoney(PlotPlayer player, double amount);
public abstract void depositMoney(OfflinePlotPlayer player, double amount);
public abstract void setPermission(PlotPlayer player, String perm, boolean value);
// public abstract void setPermission(OfflinePlotPlayer player, String perm, boolean value);
// public abstract void getPermission(OfflinePlotPlayer player, String perm);
public abstract void setPermission(String player, String perm, boolean value);
public abstract boolean hasPermission(String player, String perm);
}

View File

@ -635,6 +635,15 @@ public class MainUtil {
}
manager.startPlotMerge(plotworld, plotIds);
for (int x = pos1.x; x <= pos2.x; x++) {
for (int y = pos1.y; y <= pos2.y; y++) {
final PlotId id = new PlotId(x, y);
final Plot plot = PS.get().getPlots(world).get(id);
if (removeRoads) {
removeSign(plot);
}
}
}
for (int x = pos1.x; x <= pos2.x; x++) {
for (int y = pos1.y; y <= pos2.y; y++) {
final boolean lx = x < pos2.x;
@ -642,9 +651,6 @@ public class MainUtil {
final PlotId id = new PlotId(x, y);
final Plot plot = PS.get().getPlots(world).get(id);
Plot plot2 = null;
if (removeRoads) {
removeSign(plot);
}
if (lx) {
if (ly) {
if (!plot.getSettings().getMerged(1) || !plot.getSettings().getMerged(2)) {