MCPcopy Create free account
hub / github.com/cuberite/cuberite / TabCompleteCommand

Method TabCompleteCommand

src/Bindings/PluginManager.cpp:1792–1808  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1790
1791
1792void cPluginManager::TabCompleteCommand(const AString & a_Text, AStringVector & a_Results, cPlayer * a_Player)
1793{
1794 for (CommandMap::iterator itr = m_Commands.begin(), end = m_Commands.end(); itr != end; ++itr)
1795 {
1796 if (NoCaseCompare(itr->first.substr(0, a_Text.length()), a_Text) != 0)
1797 {
1798 // Command name doesn't match
1799 continue;
1800 }
1801 if ((a_Player != NULL) && !a_Player->HasPermission(itr->second.m_Permission))
1802 {
1803 // Player doesn't have permission for the command
1804 continue;
1805 }
1806 a_Results.push_back(itr->first);
1807 }
1808}
1809
1810
1811

Callers 1

HandleTabCompletionMethod · 0.80

Calls 4

NoCaseCompareFunction · 0.85
beginMethod · 0.80
endMethod · 0.80
HasPermissionMethod · 0.80

Tested by

no test coverage detected