#2479: Allow injection of BungeeCord commands to 1.13 with inject_commands option

This commit is contained in:
md_5
2018-12-20 10:33:36 +11:00
parent 7793894621
commit 02a65e34cf
12 changed files with 768 additions and 32 deletions

View File

@@ -11,6 +11,7 @@ import java.net.URL;
import java.net.URLClassLoader;
import java.util.Arrays;
import java.util.Collection;
import java.util.Collections;
import java.util.HashMap;
import java.util.HashSet;
import java.util.Iterator;
@@ -428,4 +429,14 @@ public class PluginManager
it.remove();
}
}
/**
* Get an unmodifiable collection of all registered commands.
*
* @return commands
*/
public Collection<String> getCommands()
{
return Collections.unmodifiableCollection( commandMap.keySet() );
}
}