From fd0af779bc1aa1e05c7979fe821c92b3ac0994e2 Mon Sep 17 00:00:00 2001 From: yoyosource Date: Fri, 23 Sep 2022 09:05:15 +0200 Subject: [PATCH] Fix LinkageProcessor --- src/de/steamwar/linkage/LinkageProcessor.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/de/steamwar/linkage/LinkageProcessor.java b/src/de/steamwar/linkage/LinkageProcessor.java index 8255791..13670de 100644 --- a/src/de/steamwar/linkage/LinkageProcessor.java +++ b/src/de/steamwar/linkage/LinkageProcessor.java @@ -309,7 +309,7 @@ public class LinkageProcessor extends AbstractProcessor { if (pluginChecks.length != 0) { buildPlan.addImport("org.bukkit.Bukkit"); Arrays.stream(pluginChecks).map(pluginCheck -> { - return "Bukkit.getPluginManager().getPlugin(\"" + pluginCheck.value() + "\") " + (pluginCheck.has() == PluginCheck.Has.THIS ? "=" : "!") + "= null"; + return "Bukkit.getPluginManager().getPlugin(\"" + pluginCheck.value() + "\") " + (pluginCheck.has() == PluginCheck.Has.THIS ? "!" : "=") + "= null"; }).forEach(checks::add); } if (!checks.isEmpty()) stringConsumer.accept("if (" + String.join(" && ", checks) + ") {"); @@ -329,7 +329,7 @@ public class LinkageProcessor extends AbstractProcessor { if (pluginChecks.length != 0) { buildPlan.addImport("net.md_5.bungee.BungeeCord"); Arrays.stream(pluginChecks).map(pluginCheck -> { - return "BungeeCord.getPluginManager().getPlugin(\"" + pluginCheck.value() + "\") " + (pluginCheck.has() == PluginCheck.Has.THIS ? "=" : "!") + "= null"; + return "BungeeCord.getPluginManager().getPlugin(\"" + pluginCheck.value() + "\") " + (pluginCheck.has() == PluginCheck.Has.THIS ? "!" : "=") + "= null"; }).forEach(checks::add); } if (!checks.isEmpty()) stringConsumer.accept("if (" + String.join(" && ", checks) + ") {");