mirror of
https://github.com/IntellectualSites/PlotSquared.git
synced 2024-11-29 13:05:41 +01:00
*
This commit is contained in:
parent
022372e9b7
commit
c1a6c75ebe
@ -64,11 +64,13 @@ public class Add extends Command {
|
|||||||
@Override // Success
|
@Override // Success
|
||||||
public void run() {
|
public void run() {
|
||||||
for (UUID uuid : uuids) {
|
for (UUID uuid : uuids) {
|
||||||
|
if (uuid != DBFunc.everyone) {
|
||||||
if (!plot.removeTrusted(uuid)) {
|
if (!plot.removeTrusted(uuid)) {
|
||||||
if (plot.getDenied().contains(uuid)) {
|
if (plot.getDenied().contains(uuid)) {
|
||||||
plot.removeDenied(uuid);
|
plot.removeDenied(uuid);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
plot.addMember(uuid);
|
plot.addMember(uuid);
|
||||||
EventUtil.manager.callMember(player, plot, uuid, true);
|
EventUtil.manager.callMember(player, plot, uuid, true);
|
||||||
MainUtil.sendMessage(player, C.MEMBER_ADDED);
|
MainUtil.sendMessage(player, C.MEMBER_ADDED);
|
||||||
|
@ -68,8 +68,10 @@ public class Deny extends SubCommand {
|
|||||||
MainUtil.sendMessage(player, C.ALREADY_ADDED, MainUtil.getName(uuid));
|
MainUtil.sendMessage(player, C.ALREADY_ADDED, MainUtil.getName(uuid));
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
if (uuid != DBFunc.everyone) {
|
||||||
plot.removeMember(uuid);
|
plot.removeMember(uuid);
|
||||||
plot.removeTrusted(uuid);
|
plot.removeTrusted(uuid);
|
||||||
|
}
|
||||||
plot.addDenied(uuid);
|
plot.addDenied(uuid);
|
||||||
EventUtil.manager.callDenied(player, plot, uuid, true);
|
EventUtil.manager.callDenied(player, plot, uuid, true);
|
||||||
if (!uuid.equals(DBFunc.everyone)) {
|
if (!uuid.equals(DBFunc.everyone)) {
|
||||||
|
@ -64,11 +64,13 @@ public class Trust extends Command {
|
|||||||
@Override // Success
|
@Override // Success
|
||||||
public void run() {
|
public void run() {
|
||||||
for (UUID uuid : uuids) {
|
for (UUID uuid : uuids) {
|
||||||
|
if (uuid != DBFunc.everyone) {
|
||||||
if (!plot.removeMember(uuid)) {
|
if (!plot.removeMember(uuid)) {
|
||||||
if (plot.getDenied().contains(uuid)) {
|
if (plot.getDenied().contains(uuid)) {
|
||||||
plot.removeDenied(uuid);
|
plot.removeDenied(uuid);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
plot.addTrusted(uuid);
|
plot.addTrusted(uuid);
|
||||||
EventUtil.manager.callTrusted(player, plot, uuid, true);
|
EventUtil.manager.callTrusted(player, plot, uuid, true);
|
||||||
MainUtil.sendMessage(player, C.TRUSTED_ADDED);
|
MainUtil.sendMessage(player, C.TRUSTED_ADDED);
|
||||||
|
@ -394,16 +394,17 @@ public class Plot {
|
|||||||
if (this.owner == null || getDenied().contains(uuid)) {
|
if (this.owner == null || getDenied().contains(uuid)) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
if (getTrusted().contains(uuid) || getTrusted().contains(DBFunc.everyone)) {
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
if (isOwner(uuid)) {
|
if (isOwner(uuid)) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
if (getMembers().contains(uuid) || getMembers().contains(DBFunc.everyone)) {
|
if (getMembers().contains(uuid)) {
|
||||||
if (isOnline()) {
|
return isOnline();
|
||||||
|
}
|
||||||
|
if (getTrusted().contains(uuid) || getTrusted().contains(DBFunc.everyone)) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
if (getMembers().contains(DBFunc.everyone)) {
|
||||||
|
return isOnline();
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user