def onPlayerCommands(cn, args): if args != '': sbserver.playerMessage(cn, error('Usage: #playercommands')) else: msg = blue('Available commands: ') for command in command_info.keys(): msg += '#' + command + ' ' sbserver.playerMessage(cn, orange(msg))
def onReloadCmd(cn, args): '''@description Reload server plugins @usage @admin''' if args != '': raise ExtraArgumentError() else: sbserver.playerMessage(cn, yellow('NOTICE: ') + blue('Reloading server plugins. Fasten your seatbelts...')) reloadPlugins()
def setMM(cn, mm): sbserver.message((info(green('%s') + ' set master mode to ' + blue('%s')) % (sbserver.playerName(cn), MMNAMES[mm]))) sbserver.setMasterMode(mm)