Added optional colorama dependency to allow colours in windows console
Added flag to disable ansi colours. Fixes #10 Now passing plugin loader to plugins onEnable
This commit is contained in:
1 parent
6025e97932
commit
4988ab6ae1
7 files changed
+30
-18
No files matched your search
@@ -4,6 +4,11 @@ import Utils
|
||||
from pluginloader import PluginLoader
|
||||
from networking import PacketSenderManager, NetworkManager
|
||||
from optparse import OptionParser
|
||||
try:
|
||||
import colorama
|
||||
colorama.init()
|
||||
except ImportError:
|
||||
pass
|
||||
|
||||
if __name__ == "__main__":
|
||||
parser = OptionParser()
|
||||
@@ -21,6 +26,10 @@ if __name__ == "__main__":
|
||||
action="store_true", default=False,
|
||||
help="run in offline mode i.e don't attempt to auth via minecraft.net")
|
||||
|
||||
parser.add_option("-c", "--disable-console-colours", dest="disableAnsiColours",
|
||||
action="store_true", default=False,
|
||||
help="print minecraft chat colours as their equivalent ansi colours")
|
||||
|
||||
# pluginLoader
|
||||
pluginLoader = PluginLoader("plugins")
|
||||
pluginLoader.loadPlugins(parser)
|
||||
|
||||
Reference in new issue
Block a user