Esempio n. 1
0
 def command(string, fromConsole):
     if string.lower() == 'stop':
         Logger.log('info', 'Stopping server...')
         PluginLoader.unloadAll()
         Logger.log('info', 'Server stopped.')
         Utils.killServer()
     elif string.lower() == '':
         return
     elif string.lower() == 'help':
         Logger.log('info', '/stop: Stops the server')
     elif string.lower() == 'reload':
         PluginLoader.reloadAll()
         Logger.log('info', 'Reload successful!')
     elif string.lower() == 'plugins' or string.lower() == 'pl':
         pluginsString = ""
         for pluginName in PluginLoader.loadedPluginsList:
             pluginsString = pluginsString + pluginName
             if pluginName != PluginLoader.loadedPluginsList[
                     PluginLoader.loadedPluginsCount - 1]:
                 pluginsString += ", "
         Logger.log(
             'info',
             f'Plugins({PluginLoader.loadedPluginsCount}): {pluginsString}')
     else:
         Logger.log('error', str(Base.get("invalidCommand")))
Esempio n. 2
0
 def command(string, fromConsole):
     if string.lower() == 'stop':
         Logger.log('info', 'Stopping server...')
         Utils.killServer()
     elif string.lower() == '':
         return
     elif string.lower() == 'help':
         Logger.log('info', '/stop: Stops the server')
     else:
         Logger.log('error', str(Base.get("invalidCommand")))
Esempio n. 3
0
 def execute(self, sender, args):
     sender.sendMessage("Stopping server...")
     Plugin.unloadAll()
     sender.sendMessage("Server stopped.")
     Utils.killServer()