mirror of
https://github.com/BentoBoxWorld/BentoBox.git
synced 2025-03-12 14:49:24 +01:00
Remove statements that are always true
This commit is contained in:
parent
df910e96d3
commit
46d20f34ff
@ -128,7 +128,7 @@ public abstract class FlagListener implements Listener {
|
||||
// Set user
|
||||
user = player == null ? null : User.getInstance(player);
|
||||
if (loc == null) {
|
||||
if (user != null && user.getLocation() != null && user.getLocation().getWorld() != null) {
|
||||
if (user != null && user.getLocation().getWorld() != null) {
|
||||
report(user, e, user.getLocation(), flag, Why.NULL_LOCATION);
|
||||
}
|
||||
return true;
|
||||
@ -184,7 +184,7 @@ public abstract class FlagListener implements Listener {
|
||||
}
|
||||
|
||||
private boolean processBypass(@NonNull Flag flag, Island island, @NonNull Event e, @NonNull Location loc, boolean silent) {
|
||||
// If it is not allowed on the island, "bypass island" moderators can do anything
|
||||
// If it is not allowed on the island, "bypass island" moderators can do anything
|
||||
if (island.isAllowed(user, flag)) {
|
||||
report(user, e, loc, flag, Why.RANK_ALLOWED);
|
||||
return true;
|
||||
@ -241,7 +241,7 @@ public abstract class FlagListener implements Listener {
|
||||
.filter(p -> getPlugin().equals(p.getOwningPlugin())).findFirst().map(MetadataValue::asString).orElse("");
|
||||
if (!issuerUUID.isEmpty()) {
|
||||
User issuer = User.getInstance(UUID.fromString(issuerUUID));
|
||||
if (issuer != null && issuer.isPlayer()) {
|
||||
if (issuer.isPlayer()) {
|
||||
user.sendRawMessage(whyEvent);
|
||||
user.sendRawMessage(whyBypass);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user