Invert plugin availability check per #1955

This commit is contained in:
PikaMug 2022-05-09 04:03:32 -04:00
parent a02ca87d79
commit 44ce64a7e9

View File

@ -206,7 +206,7 @@ public class Condition implements ICondition {
} else if (!permissions.isEmpty()) {
// Must have ALL listed permissions
for (final String p : permissions) {
if (plugin.getDependencies().isPluginAvailable("Vault")) {
if (!plugin.getDependencies().isPluginAvailable("Vault")) {
plugin.getLogger().warning("Vault must be installed for condition permission checks: " + p);
return false;
}
@ -272,7 +272,7 @@ public class Condition implements ICondition {
// Must have ALL listed placeholders equal true
int index = 0;
for (final String i : placeholdersCheckIdentifier) {
if (plugin.getDependencies().isPluginAvailable("PlaceholderAPI")) {
if (!plugin.getDependencies().isPluginAvailable("PlaceholderAPI")) {
plugin.getLogger().warning("PAPI must be installed for placeholder checks: " + i);
return false;
}