Skip to content

Commit

Permalink
Add cncp and ProtocolLib versions to 'ncp version' output.
Browse files Browse the repository at this point in the history
  • Loading branch information
asofold committed Dec 24, 2015
1 parent b2aae76 commit 4730b35
Showing 1 changed file with 11 additions and 0 deletions.
Expand Up @@ -12,6 +12,7 @@
import org.bukkit.Bukkit;
import org.bukkit.command.Command;
import org.bukkit.command.CommandSender;
import org.bukkit.plugin.Plugin;
import org.bukkit.plugin.java.JavaPlugin;

import fr.neatmonster.nocheatplus.NCPAPIProvider;
Expand Down Expand Up @@ -69,6 +70,16 @@ public static List<String> getVersionInfo() {
Collections.sort(fullNames, String.CASE_INSENSITIVE_ORDER);
lines.add("Hooks: " + StringUtil.join(fullNames, " | "));
}
final List<String> relatedPlugins = new LinkedList<String>();
for (final String name : new String[]{"CompatNoCheatPlus", "ProtocolLib"}) {
Plugin plugin = Bukkit.getPluginManager().getPlugin(name);
if (plugin != null) {
relatedPlugins.add(plugin.getDescription().getFullName());
}
}
if (!relatedPlugins.isEmpty()) {
lines.add("Related plugins: " + StringUtil.join(relatedPlugins, " | "));
}
return lines;
}

Expand Down

0 comments on commit 4730b35

Please sign in to comment.