Linkage #20

Zusammengeführt
Lixfel hat 24 Commits von Linkage nach master 2022-09-23 12:45:21 +02:00 zusammengeführt
Nur Änderungen aus Commit fd0af779bc werden angezeigt - Alle Commits anzeigen

Datei anzeigen

@ -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) + ") {");