Notify inbox permission

This commit is contained in:
Jesse Boyd 2016-11-02 04:27:52 +11:00
parent 68011f43cd
commit c950b0021f
No known key found for this signature in database
GPG Key ID: 59F1DE6293AF6E1F

View File

@ -14,8 +14,8 @@ public abstract class CommentInbox {
public abstract String toString(); public abstract String toString();
public boolean canRead(Plot plot, PlotPlayer player) { public boolean canRead(Plot plot, PlotPlayer player) {
if (Permissions.hasPermission(player, "plots.inbox.read." + toString())) { if (Permissions.hasPermission(player, "plots.inbox.read." + toString(), true)) {
if (plot.isOwner(player.getUUID()) || Permissions.hasPermission(player, "plots.inbox.read." + toString() + ".other")) { if (plot.isOwner(player.getUUID()) || Permissions.hasPermission(player, "plots.inbox.read." + toString() + ".other", true)) {
return true; return true;
} }
} }
@ -24,15 +24,15 @@ public abstract class CommentInbox {
public boolean canWrite(Plot plot, PlotPlayer player) { public boolean canWrite(Plot plot, PlotPlayer player) {
if (plot == null) { if (plot == null) {
return Permissions.hasPermission(player, "plots.inbox.write." + toString()); return Permissions.hasPermission(player, "plots.inbox.write." + toString(), true);
} }
return Permissions.hasPermission(player, "plots.inbox.write." + toString()) && (plot.isOwner(player.getUUID()) || Permissions return Permissions.hasPermission(player, "plots.inbox.write." + toString(), true) && (plot.isOwner(player.getUUID()) || Permissions
.hasPermission(player, "plots.inbox.write." + toString() + ".other")); .hasPermission(player, "plots.inbox.write." + toString() + ".other", true));
} }
public boolean canModify(Plot plot, PlotPlayer player) { public boolean canModify(Plot plot, PlotPlayer player) {
if (Permissions.hasPermission(player, "plots.inbox.modify." + toString())) { if (Permissions.hasPermission(player, "plots.inbox.modify." + toString(), true)) {
if (plot.isOwner(player.getUUID()) || Permissions.hasPermission(player, "plots.inbox.modify." + toString() + ".other")) { if (plot.isOwner(player.getUUID()) || Permissions.hasPermission(player, "plots.inbox.modify." + toString() + ".other", true)) {
return true; return true;
} }
} }