Closed djrecipe closed 9 years ago
See: https://github.com/MyEssentials/MyTown2/blob/master/src/main/java/mytown/entities/Town.java
public boolean checkPermission(Resident res, FlagType flagType, Object denialValue, int dim, int x, int y, int z) {
Plot plot = getPlotAtCoords(dim, x, y, z);
if (plot == null || flagType.isTownOnly()) {
if(getValue(flagType).equals(denialValue) && !hasResident(res) && (!residentHasFriendInTown(res) || ((Boolean) getValue(FlagType.RESTRICTIONS) && !(getMayor() == res)))) {
return PlayerUtils.isOp(res.getPlayer());
}
} else {
if (plot.getValue(flagType).equals(denialValue) && !plot.hasResident(res) && !plot.residentHasFriendInPlot(res))
return PlayerUtils.isOp(res.getPlayer());
}
return true;
}
I was thinking of simply adding it as a config option. I can even have it set as a permission string, but that might be a little more difficult.
Added in MyPermissions through the bypass perms.
Hello again.
Currently I am trying to use your mod on my server, but I want to force ops to be restricted by MyTown2 just like everyone else. Whether or not my ops are able to somehow circumvent a town's permissions simply by changing them (they would never do that) - I need a way to force them to obey all town restrictions set by other players, for the sake of roleplaying/gameplay.
I can think of two solutions for this issue: a) Easy: a global flag in the MyTown.cfg file b) Harder: a per-town permission flag that is only settable by an op (via /ta commandset probably)