mirror of
https://github.com/NoCheatPlus/NoCheatPlus.git
synced 2025-03-12 14:39:12 +01:00
Add cncp and ProtocolLib versions to 'ncp version' output.
This commit is contained in:
parent
b2aae768b6
commit
4730b35c17
@ -12,6 +12,7 @@ import java.util.Set;
|
||||
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;
|
||||
@ -69,6 +70,16 @@ public class VersionCommand extends BaseCommand{
|
||||
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;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user