From 46d20f34ffc1aa70e79a32f215b0aa6777c58e97 Mon Sep 17 00:00:00 2001 From: tastybento Date: Sun, 5 Feb 2023 15:50:04 -0800 Subject: [PATCH] Remove statements that are always true --- .../world/bentobox/bentobox/api/flags/FlagListener.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/main/java/world/bentobox/bentobox/api/flags/FlagListener.java b/src/main/java/world/bentobox/bentobox/api/flags/FlagListener.java index b8b7c868d..b1fbd273b 100644 --- a/src/main/java/world/bentobox/bentobox/api/flags/FlagListener.java +++ b/src/main/java/world/bentobox/bentobox/api/flags/FlagListener.java @@ -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); }